1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Rotation of entities

Discussion in 'Development' started by Pylay, Aug 11, 2018.

  1. Pylay

    Pylay Spider

    Messages:
    10
    How to rotate entity in a vertical plane?
     
  2. RumDaDuMCPE

    RumDaDuMCPE Witch

    Messages:
    67
    GitHub:
    RumDaDuMCPE
    If you mean to set the player's Pitch, Use:
    PHP:
    $player->setRotation($yaw$pitch);
    An example:
    PHP:
    $yaw $player->getYaw();
    for (
    $pitch $player->getPitch(); $pitch += 20$pitch++) {
        
    $player->setRotation($yaw$pitch);
    }
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.