Physics Engine/Gravity Help

Hey everyone!

I’m a fresh user of Panda and I’ve recently started making a game. It’s similar to Roaming-Ralph with map navigation, but I am also dropping objects from the sky down to the terrain because of uneven terrain.

I managed to get the gravity to work, but whenever the objects hit the ground, they slide everywhere because of the uneven terrain. How can I get them to just stay in the position I call them to? :confused:


You probably need to be more specific on what exactly you did to get gravity to work. There are multiple ways you could implement what you’re doing, and how to solve it exactly depends on which one. Sliding behaviour is not in the original roaming ralph, so you’ve explicitly coded it to do that at some point.

The usual solution to stop sliding is to decide on a minimum angle where collisions below that angle won’t move the object sideways under gravity.

physics engines usually have some sort of material descriptor that can be set to surface. you want to change friction of the surface. also take slopes into account.

I concur with Tober: would you please tell us – or paste into code tags – the relevant parts of the code that you’re using? In particular, whatever it is that’s producing sliding for other objects, or what changes you’ve made to the Roaming Ralph implementation.