[SOLVED] Spatial look at

    ```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

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

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”.


i rotate model in blender and apply ratation
not work :frowning:

solved i save model in the wrong folder