yaw degree calculating

Started by Darknessay on

Topic category: Help with modding (Java Edition)

Last seen on 12:50, 18. Sep 2024
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
yaw degree calculating

i want my spider-like mob's LEGS to spawn on his moving direction +30 degree, and then -30 degree alternatively

i used this formula to spawn his legs in circle around him when spawned, and it works fine, but the same formula doesnt works in his moving trigger, i dont getting why, help pls

https://imgur.com/a/8jp3oyr
(imgs: 1 - his tick, 2 - spawn, 3 - just spawned mob in game, 4 - legs spawning while move)
 

Last seen on 12:50, 18. Sep 2024
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
i send to chat mob's yaw, it…
Mon, 09/16/2024 - 05:51

i send to chat mob's yaw, it shows 200 and 300 numbers, how can it be, if when i send to chat player's yaw its only include numbers between -180 and 180?

i dont getting these freaking maths(

Last seen on 12:50, 18. Sep 2024
Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Solution:x + (5*sin(angle/(…
Mon, 09/16/2024 - 10:25

Solution:
x + (5*sin(angle/(-180/π)))
y + (5*cos(angle/(-180/π)))
instead of using DEGTORAD