Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Change a players facing direction.

Comments in 'Plugin Development' started by xFlare, Jan 6, 2015.

  1. xFlare
    Offline

    xFlare Active Member Plugin Developer

    Joined:
    Sep 28, 2014
    Posts:
    199
    Plugins:
    1
    Minecraft User:
    xFlare
    How can I force a players client to look north/west/south/east?
    Junhua likes this.
  2. xFlare
    Offline

    xFlare Active Member Plugin Developer

    Joined:
    Sep 28, 2014
    Posts:
    199
    Plugins:
    1
    Minecraft User:
    xFlare
    With vector3?
  3. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    $player->setYaw($yaw)
    http://en.wikipedia.org/wiki/Flight_dynamics for what "yaw" means
    Do some testing to see what yaw is north.

    Edit: You have to use $player->teleport($player->getPosition(), $yaw) instead for players.
    Junhua and xFlare like this.
  4. PEMapModder
    Offline

    PEMapModder Notable Member Plugin Developer

    Joined:
    Oct 9, 2013
    Posts:
    7,294
    Plugins:
    11
    Minecraft User:
    PEMapModder
    xFlare likes this.

Share This Page

Advertisement