What is the correct way to change a Kinematic body into a dynamic body?
context - I have a dynamic body as a projectile which has to be fired at a kinematic body (it is kinematic because i am tweening it around the world in random movements). when the projectile makes contact with the kinematic body I would like it to become a dynamic body and be affected by gravity and I will apply a force to the contact point.
At the moment I am simply changing the type with in a menthod called by the contactListener
body.setType(BodyType.DynamicBody);
my biggest issue is that gravity is not acting on the body once it is changed to dynamic, so I'm pretty certain I'm going about this the wrong way.
setType
function may be locked during callbacks (e.g. inside collision callback functions). However, this is not indicated in the libgdx docs or the box2d c++ docs. \$\endgroup\$