#rigid body model sliding like its on ice?

4 messages · Page 1 of 1 (latest)

hasty bone
#

I am trying to simulate physics through rapier for the car below, but its sliding out of control, even with no external forces being applied to it.

Friction for both the ground and the wheels of the model are set like so:

Friction { coefficient: (1000.0), combine_rule: (CoefficientCombineRule::Average) },

there is no damping(I assumed friction with the ground would stop sliding?)

but the model is sliding out of control like its on ice. What could I be missing?

west flame
#

I had a similar issue, where my player sprite would bump an enemy and then start spinning and fly out of the arena like it was Team Rocket blasting off ...

What fixed it for me was inserting Damping

.insert(Damping {
            linear_damping: 15.0,
            angular_damping: 10.0,
        });

https://rapier.rs/docs/user_guides/bevy_plugin/rigid_bodies
I guess there should be something similiar in the 3d rapier plugin?

The real-time simulation of rigid-bodies subjected to forces and contacts is the main feature of a physics engine for

hasty bone
onyx flume
#

I don't think it will help here but I've had a somewhat similar issue where it helped to subdivide the ground collider (or make it smaller)