nnpa
February 28, 2023, 3:24am
1
```CharacterControl control = spatial.getControl(CharacterControl.class);
Vector3f monsterPosition = control.getPhysicsLocation();
//Vector3f monsterPosition = spatial.getLocalTranslation();
Vector3f playerPosition = app.charPosition.getLocalTranslation();
spatial.lookAt(playerPosition, Vector3f.UNIT_Y);
the monster must look at the player
but he looks back
i try rotate model in blender and save
but he still turns his back
sgold
February 28, 2023, 4:01am
2
JMonkeyEngine convention is that the +Z axis (0, 0, 1) should point forward.
Perhaps the monster model is reversed, with the -Z axis (0, 0, -1) pointing forward.
1 Like
rickard
February 28, 2023, 7:04am
3
If you rotate the model in blender, make sure to “Apply rotation”, or jme will just modify the existing rotation. “Applying” will set the current blender rotation as “0”.
2 Likes
nnpa
February 28, 2023, 3:16pm
4
i rotate model in blender and apply ratation
not work
nnpa
February 28, 2023, 5:50pm
5
solved i save model in the wrong folder
2 Likes