how to make entity look where your looking looking

Started by Freddy101 on

Topic category: Help with modding (Java Edition)

Last seen on 18:17, 12. Jun 2024
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how to make entity look where your looking looking
Tue, 01/23/2024 - 06:34 (edited)

for this procedure, i wanted to spawn a mob in front of me and have it looking the same place I was looking when I spawned it but I cant seem to move the entitys head and where its look at all.

 

i would also settle for being able to spawn the entity rotated where I am looking but when I do it only spawns on the x axis so I cant face it upwards or down

 

Edited by Freddy101 on Tue, 01/23/2024 - 06:34
Last seen on 12:40, 16. Jun 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Set the direction the player…
Tue, 01/23/2024 - 17:22

Set the direction the player is looking at in a variable. Make the entity look in that direction/variable. 

Last seen on 18:17, 12. Jun 2024
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how would i do that  
Tue, 01/23/2024 - 20:44

how would i do that

 

Last seen on 18:17, 12. Jun 2024
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
how would i do that
Tue, 01/23/2024 - 20:45

how would i do that

Last seen on 18:17, 12. Jun 2024
Joined Aug 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
and do you mean a local…
Tue, 01/23/2024 - 20:48

and do you mean a local variable

Last seen on 12:40, 16. Jun 2024
Joined Oct 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Yes I do mean that. On play…
Tue, 01/23/2024 - 21:03

Yes I do mean that. On play update tick, set varible to entity direction entity is facing. On (Your) entity update tick, set the direction they face to that varible.