make mob runaway from player (trouble with maths)

Started by Darknessay on

Topic category: Help with Minecraft modding (Java Edition)

Joined Nov 2019
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
make mob runaway from player (trouble with maths)

i think you all understand what im trying to do in this screenshot. please help with right formula!

x + N * sin (YAW / (-180/n)) - this works fine with players YAW, but when i try to get same degree value with atan2(from cords to cords), i probably doing something wrong.

as you can see, i already tried convert values with RADTODEG and DEGTORAD, but im not good in maths so i dont understand much in values that i use, i only know that coordinate system use radians, not degrees - thats why i have to do (RADTODEG * atan2), but i dont even know what radians is :D