Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[API] - NPC#lookAt uses feet location, not eye location #22

Open
IllusionTheDev opened this issue Jan 2, 2023 · 2 comments
Open

[API] - NPC#lookAt uses feet location, not eye location #22

IllusionTheDev opened this issue Jan 2, 2023 · 2 comments

Comments

@IllusionTheDev
Copy link

The title explains itself.

@SergiFerry
Copy link
Owner

SergiFerry commented Jan 2, 2023 via email

@IllusionTheDev
Copy link
Author

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));

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants