[SOLVED] EulerAngle - How many units are how many degrees

Discussion in 'Spigot Plugin Development' started by rickydaan, Jun 16, 2015.

  1. Hello,

    I am working on a plugin involving armorstands with rotating arms, and I need to be able to set the rotation of the arms in degrees (0-360). How would I go with doing this? An EulerAngle makes a full round in about 3.6d, which is not by far the 360 degrees which you would expect.

    Kind regards,
    Techdaan.
     
  2. Maybe I'm wrong, but since it's a double maybe each degree is 0.01? Try multiplying the double by 100 and you can have your degrees. If not, then please ignore :p
     
  3. Nah, I found it out by asking a friend of mine. Basically armor stands (And all other objects using EulerAngles) use Radians:
    Code (Text):
    stand.setLeftArmPose(new EulerAngle(Math.toRadians(90), Math,toRadians(180), Math.toRadians(90));
    if that is correct (Wrote it out of my head, not sure if it is correct), would set the left arm's pose of an armor stand to 90 degrees X and Z, and 180 degrees Y :)