I am trying to use bullet for my character movement instead of the usual setLocalTranslation() on my nodes.
so i have the following :
public void move(Vector3f force) {
notifyMove();
//Move your spatial here
model.setKinematic(true);
model.applyTorque(force);
//model.setLocalTranslation(model.getLocalTranslation().add(newLocation));
}
Which I am trying to get to do my movement.... However thats not working - probably because I dont understand what its meant to do.
Basically I want to send in a parameter like - a force to state what direction my charcter should move - and ideally the strength of the force incase I have a boost / weather affect i wana apply before I send the move call.
Can somebody direct me as to what calls i would make to my physicsNode to support this!
Torque "twists" an object while force "pushes" it. So you're probably going to want to use force to move instead of torque. Also, what kind of character are you trying to move? It might be more advantageous to use a PhysicsCharacterNode instead.