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
    link
    fedilink
    English
    arrow-up
    3
    ·
    1 year 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.

    • DuckRaGodOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      1 year ago

      Hey, sorry for the inconvenience. I am applying the velocity using an impulse.