Jump to content

i77_

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by i77_

  1. Hi!
    I'm trying to make a script that automatically aims at the nearest entity. To do this I subtract the entity's position from the players position, put that through atan to get the angle. Now the part that confuses me is that in minecraft the yaw rotation angle ranges from -180 to 180 degrees, but atan only returns -90 to 90. How am I supposed to implement this properly?
     

    EDIT: I also know that I have to add 90 to the angle. This results in the yaw always being positive, making the player do a 180 degree flip at certain positions.

×
×
  • Create New...

Important Information

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