Is it possible to have a kinematic body penetrations against static bodies resolved? #699
Replies: 1 comment
-
No this is not possible (or at least not within Jolt). The definition of a kinematic object is that is has infinite mass. This means that nothing can push it away. A static object also has infinite mass, so if we were to allow two infinitely heavy objects to interact with each other it would be undefined what would happen. What you can do is to perform an additional collision check and update the velocity of the kinematic body to stop at a static object yourself. Making player controllers is difficult stuff though, I would advice you to take a look at |
Beta Was this translation helpful? Give feedback.
-
Hi,
I'm trying to set up a simple player controller that does the following:
I have a lot of this working however:
When I set the player to Kinematic, it pushes dynamic bodies around, but it is not stopped by static bodies and I don't get callbacks via my ContactListener
When I set the player body to be a sensor, I get callbacks, but dynamic bodies are not affected by the player body, and the player body is not stopped by static bodies.
Is it possible to have my cake and eat it, where the kinematic player body affects dynamic bodies, but is stopped by static bodies, and I get ContactListener callbacks for all contacts on the player body without having to add an additional sensor body to the player?
Thanks!
Rob
Beta Was this translation helpful? Give feedback.
All reactions