Open IllusionTheDev opened 1 year ago
It looks at the eye location.
[image: image.png]
El lun, 2 ene 2023 a las 4:29, ImIllusion @.***>) escribió:
The title explains itself.
— Reply to this email directly, view it on GitHub https://github.com/SergiFerry/PlayerNPC/issues/22, or unsubscribe https://github.com/notifications/unsubscribe-auth/AVGYYCXROTQ4C6Y4X5OWIHTWQJDSJANCNFSM6AAAAAATOPHENY . You are receiving this because you are subscribed to this thread.Message ID: @.***>
Not really, no.
Create an NPC at 0, 128, 0 (eye location: 0, 129.6, 0)
Set it to look at 1, 128, 0
Observe that the pitch is 0, which makes the npc look ahead, instead of down
My fix: npc.lookAt(targetLocation.add(0, -1.6, 0));
The title explains itself.