Thanks to visit codestin.com
Credit goes to programming.dev

I have a Rigidbody3D, let’s call it Bob, that has a linear velocity of Vector3.down.

This Rigidbody3D is on top of another Rigidbody3D, let’s call it Alex, which is a regular Rigidbody3D. Both of them are on top of a StaticBody.

What happens is that Alex is going inside the StaticBody, but what I want is for both Rigidbodies to remain stationary.

How can I achieve this?

  • ice9@lemmy.world
    Codestin Search App
    Codestin Search App
    English
    Codestin Search App
    3
    ·
    3 years ago

    Are you setting the linear velocity explicitly? For rigidbodies, you should be controlling them with forces for the physics to work correctly.

    If you want to control velocities, you need to use a kinematic body and code the physics logic yourself.