[SOLVED] Enemy doesn't look at me!

The enemy shoots and moves toward the player with lookAt. However, he doesn’t turn to face him! Why does he move and shoot in the correct direction, but not face the correct direction?

This.entity.rotateLocal(0, 90, 0);

Play with params. You should call it after lookAt.

Okay, probably not your case.

Well, that gave the enemy the ability to shoot me, but he still doesn’t face me.

Give me edit permission to your project, I can’t fork it everytime. Nickname: mikefinch

Done, you can now edit.

image

I can only read.

Done, now you can edit.

Oh, thanks. You messed up your code there by setting the position to currentRotation, but I fixed it. Thanks!

Yes, I left some comments. I just tested, it works okay.
Do you still have problem?..

Not in this area. I would like to know how to get him to aim right.