Setting linear velocity and angular velocity of a kinematic body (#4170) (SOLVED)

I think it boils down to efficiency in the end. This is a good summary:

  • Static bodies are unmoved.
  • Kinetic bodies are moved based on their previous velocities.
  • Dynamic bodies are moved based on their previous velocities, gravity, applied forces, applied impulses, masses, damping, and the restitution and friction values of their fixtures when they experience collisions.

Practically, in Defold, I don’t think it’s possible to remove gravity from a dynamic body. This means that dynamic bodies colliding with a moving platform is hard to achieve. Dynamic bodies colliding with a kinematic object which is “teleported” with set_position() each frame is unpredictable.

To me, the main benefit of having kinematic bodies with velocity would be a more stable physics simulation when using them in conjunction with dynamic bodies.

2 Likes