Hi i have a problem with lookAt or at least think soo…
I have a model that moves by :
getNodeBody().move(getNodeBody().getLocalRotation().getRotationColumn(2).getX()* (tpf*0.8f), 0, getNodeBody().getLocalRotation().getRotationColumn(2).getZ()*(tpf*0.8f));// move
And has to look at by :
nodeBody.lookAt(new Vector3f(wayPoint.getX(), nodeBody.getLocalTranslation().getY(), wayPoint.getY()),new Vector3f(0, 1, 0));
now look at is making my model look at it by right shoulder , while move with rotation column 2 is pretty perfect and makes it move where is pointed .
I dont know why this happens , i supposed that i have imported model , while it was rotated wrong , but why it moves forward with move method than ?
Well i dont know what might be wrong , all code is here, as i tested it separatelly on an TEST launcher ( extends SimpleApplication ), with only 2 models and this code in
public void simpleUpdate(float tpf) . and one model was running arround the other
PS my imported models are looking in direction of blue arrow in jme model opener
PS.PS i have used as well this code , for some minor rotattions
nodeBody.rotate(0 , FastMath.DEG_TO_RAD*30, 0);
after i deleted it seems lookAt worked fine, now , is there a way to rotate a node , without breaking lookAt ?
if u use look at right ,and then at left ,it make no jokes, but after nodeBody.rotate(0 , FastMath.DEG_TO_RAD*30, 0);
it actually keep considering rotation in rotation column ,but not in look at