Jump to content

move a body from positon A to B?


Recommended Posts

First of all, it can be useful: addForce() to BodyRigid instance

Second, I have similar task, but not succeed yet, cause I powerless in physics :rolleyes:

For example:

vec3 p0 = // destination position
vec3 p1 = // current body position

vec3 force = (p0 - p1) * 128.0f - body.getLinearVelocity() * 32.0f;

body.addForce(force * body.getMass());

Link to comment
×
×
  • Create New...