turning.z = maxTurning.getNumberValue().doubleValue();
// move
javax.vecmath.Vector3d vector = new javax.vecmath.Vector3d( dt*speed.x, dt*speed.y, dt*speed.z );
Transformable subjectTransformable = subject.getTransformableValue();
try {
vector = subjectTransformable.preventPassingThroughOtherObjects( vector, 2 );
} catch( Throwable t ) {
//pass
}
subjectTransformable.moveRightNow( vector );
/*
double yPos = ((Transformable)subject.get()).getPosition().getItem(1);
((Transformable)subject.get()).moveRightNow(Direction.FORWARD,dt*speed.z);
if (((Boolean)stayOnGround.get()).booleanValue()) {
Vector3 pos = ((Transformable)subject.get()).getPosition();
pos.setItem(1,yPos);
((Transformable)subject.get()).setPositionRightNow(pos);
}
((Transformable)subject.get()).moveRightNow(Direction.RIGHT,dt*speed.x);
((Transformable)subject.get()).moveRightNow(Direction.UP,dt*speed.y);
*/
((Transformable)subject.get()).turnRightNow(Direction.FORWARD,dt*turning.x);
if (((Boolean)stayOnGround.get()).booleanValue()) {
Transformable t = new Transformable();
t.setPositionRightNow(((Transformable)subject.get()).getPosition(((Transformable)subject.get()).getWorld()));
//t.setOrientationRightNow(((Transformable)subject.get()).getWorld().getOrientationAsQuaternion());
((Transformable)subject.get()).turnRightNow(Direction.RIGHT,dt*turning.y,t);
} else {
((Transformable)subject.get()).turnRightNow(Direction.RIGHT,dt*turning.y);
}