OK Here is my problem. I am using a Quaternion to store the rotation of my model. I rotateting using the following method
/**
* Rotates _currentRotation Quaternion around an axis and an angle
* @param angle
* @param rotationAxis
*/
public void rotate(float angle,Vector3 rotationAxis){
Quaternion key_quat,
temp_quat; // temp quaternion
//create new Quat from axis and angle
key_quat = new Quaternion(rotationAxis,angle);
temp_quat = _currentRotation;
_currentRotation = temp_quat.mult(key_quat);
}
I want the direction in a vector.,because I need it as velocity so I can increment my position, in the correct direction.
public void simulate(float dt) {
_velocity._x += (_force._x/_m) *dt;
_velocity._y += (_force._y/_m) *dt;
_velocity._z += (_force._z/_m) *dt;
_position._x += _velocity._x *dt;
_position._y += _velocity._y *dt;
_position._z += _velocity._z *dt;
}