# Imposter sizing

I want to program a variant of the game bolder dash, which i liked to play on the commodore 64 in my young years. It’s about collecting diamonds and avoiding falling rocks.

The idea: At first the objects lie on a flat ground, which is slowly tilted, causing the stones and diamonds to slide. The aim is to collect as many diamonds as possible with one mouse click.

The problem:
When I enlarge the pillar, the base falls through. (clicking on the flat ground sizes the pillar)

https://playground.babylonjs.com/#WJ3XWJ

ok, solved it with DistanceJoint!

https://playground.babylonjs.com/#WJ3XWJ#1

click multiple times on the sphere and you’ll see the effect: rolling stones!

2 Likes

hahah Cool.

I was trying one, too…same principle… except… put distance joint between ground and base plane.

https://playground.babylonjs.com/#WJ3XWJ#3

I was trying to change joint distance OR mainPivotPoint with each click (lines 87/88)… failed so far. Ammo is alien to me. I’m better at Oimo.

A little note to Tom about WHY his up-scaling of “the pole” didn’t work. I dunno why. I think it has to do with the pole’s bounding-area enlarging, and on the next physics step… the “re-calc” sees no surfaces colliding. IF you would apply a tiny upward impulse on the lifted platform (near the lift-pole)… just before the pole upscale, it MIGHT start working. Then, the pole upscale could happen WITHOUT a collision being a factor. After the up-scale, the lifted platform would “land” atop the pole (gravity), and all would be fine… I think. You might STILL need a box_foot_base.physicsImpostor.setScalingUpdated(); …after the up-scaling.

Interesting solve, Necips! Just make the sphere.visibility = 0… and who would know there was a sphere involved.

2 Likes