Make player look at other player?

Discussion in 'Plugin Development' started by NerdsWBNerds, May 6, 2014.

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

    NerdsWBNerds

    How can I make a plugin that forces one player to look towards another?
     
  2. Offline

    Windy Day

    You would have to calculate the pitch and yaw so that playerA would face playerB. Then set playerA's location to the same x,y,z value but with the calculated pitch and yaw.
     
  3. Offline

    Zacky1

    I don't think it's necessary to update the playerA's location, as in get and set.

    I haven't compiled it however it should work.
    playerA.getLocation().setPitch(float);
    playerA.getLocation().setYaw(float);
     
  4. Offline

    LeoFSU

  5. Offline

    Windy Day

    Zacky1
    True I forgot about that :)
     
Thread Status:
Not open for further replies.

Share This Page