qyli Posted February 25, 2011 Share Posted February 25, 2011 how can i do that? i think a way is to calculate the force and add to the body, but i don't know how to calculate it. Link to comment
eugene.litvinov Posted February 25, 2011 Share Posted February 25, 2011 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
Recommended Posts