Jump to content

[1.16.5] Need help getting YAW of entity relative to the player.


Recommended Posts

Posted

I need help in getting the position of an enderman, then setting the YAW Head position to where that enderman is standing relatively to the player. Can I do something like that?

Posted
2 minutes ago, Luis_ST said:

if you need a quick solution, take a look at the discord
https://discord.gg/UvedJ9m

Ok thanks

 

2 minutes ago, diesieben07 said:

This is a forum. Be patient. When someone knows the answer, they will answer.

From what I can tell you just need some vector math and trigonometry.

K I will try it

Posted
9 hours ago, diesieben07 said:

This is a forum. Be patient. When someone knows the answer, they will answer.

From what I can tell you just need some vector math and trigonometry.

I tried to do that. But I couldn't find how to get the needed YAW number to set the player to. How can i do that?

Posted (edited)

you still haven't understood how the forum works, right?
there are people here from all over the world, and not everyone is familiar with everything, so wait till someone knows an answer

i'm not much familiar with vector calculation, but in addition to the things diesieben07 told you
take a look at the EnderEyeEntity, it use the same logic, it always fly to the next Stronghold,
copy the logic and replace the Stronghold pos with the Player pos

Edited by Luis_ST
Posted
51 minutes ago, Luis_ST said:

you still haven't understood how the forum works, right?
there are people here from all over the world, and not everyone is familiar with everything, so wait till someone knows an answer

i'm not much familiar with vector calculation, but in addition to the things diesieben07 told you
take a look at the EnderEyeEntity, it use the same logic, it always fly to the next Stronghold,
copy the logic and replace the Stronghold pos with the Player pos

TYSM works like a charm now.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.