this post was submitted on 16 Jun 2023
9 points (100.0% liked)

Godot

6008 readers
90 users here now

Welcome to the programming.dev Godot community!

This is a place where you can discuss about anything relating to the Godot game engine. Feel free to ask questions, post tutorials, show off your godot game, etc.

Make sure to follow the Godot CoC while chatting

We have a matrix room that can be used for chatting with other members of the community here

Links

Other Communities

Rules

We have a four strike system in this community where you get warned the first time you break a rule, then given a week ban, then given a year ban, then a permanent ban. Certain actions may bypass this and go straight to permanent ban if severe enough and done with malicious intent

Wormhole

[email protected]

Credits

founded 2 years ago
MODERATORS
 

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?

you are viewing a single comment's thread
view the rest of the comments
[โ€“] ice9 3 points 2 years ago (1 children)

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.

[โ€“] [email protected] 1 points 2 years ago

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