Get body direction during elytra-flight / sleeping

Discussion in 'Plugin Development' started by MightyOne, Jun 26, 2017.

Thread Status:
Not open for further replies.
  1. Offline

    MightyOne

    Hey guys,
    I am currently working with Spigot 1.12 and a question came to my mind. I already know how to get/set a players head direction but since there are elytras: Is there any way to recieve the rotation of a players body during e.g. sleeping or flying with an elytra? I could not find any useful posts about it yet. Any help would be appretiated, thanks.
     
  2. Offline

    Zombie_Striker

    @MightyOne
    For sleeping, their head is normally 20° up relative to their body direction. As for gliding, it is around 20° down. (have not done actual measurements, so these are rough guesses based on what I have seen.)

    If you are really looking for precise measurements, you can take screenshots of players in those situations and use pixel length to determine the exact angle of their head.
     
Thread Status:
Not open for further replies.

Share This Page