So, I am trying to create a simple mechanic for my puzzle-platformer … boxes.
But for the life of me I cannot think of a good solution to implementing them. I want the boxes to fall with gravity, and be push-able on the X-axis, but not the Z-axis (I have had problems with the player pushing the box through the floor).
The easiest solution is what I have at the moment, just using the built-in character movement push force, but this leads to two issues:
When pushing along a tile map, the box seems to collide randomly with the edges of tiles and ‘jump’. Box-Popping on Vimeo
And when the player is on top of the box, but offset to the side, the box slowly ‘slides’. Box-Sliding on Vimeo
Any help or advice for make a push-able box in 2D, greatly appreciated.
Yes, the pushing is done using the CMC Physics Interaction.
The downward force scale worked!
I have tried adding a more nuanced collider, but it still results in some ‘jumping’.
I think for now I am going to have to manually place the colliders for my levels, as the tile map adds one for each individual tile. And because there a so many ‘gaps’ between the colliders it is constantly clipping an edge, resulting in the box ‘jumping’.