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

Entity Motion

Discussion in 'Development' started by Kenn Fatt, Jan 24, 2017.

  1. Kenn Fatt

    Kenn Fatt Slime

    Messages:
    82
    GitHub:
    kennfatt
    i cant explain it with word, so watch the video.

    ask something about the code and i'll give it to the comment session.
    if you have solution, please tell me xD. i was try using SetEntityMotionPacket but nothing change.

    https://sendvid.com/stzh8qmk#
     
  2. Kenn Fatt

    Kenn Fatt Slime

    Messages:
    82
    GitHub:
    kennfatt
    PHP:
    /** DataPacketSendEvent */
    if($event->getPacket() instanceof MoveEntityPacket){

              
    $p $event->getPacket();
              
    $target $event->getPlayer();

              
    $p->$target->x;
              
    $p->$target->y;
              
    $p->$target->z;
              
    $p->yaw $target->yaw;
              
    $p->headYaw $target->yaw;
              
    $p->pitch $target->pitch;

            }
     
    Last edited: Jan 24, 2017
  3. Redux

    Redux Spider Jockey

    Messages:
    49
    GitHub:
    reduxredstone
  4. Kenn Fatt

    Kenn Fatt Slime

    Messages:
    82
    GitHub:
    kennfatt
  5. Redux

    Redux Spider Jockey

    Messages:
    49
    GitHub:
    reduxredstone
    Yeah createEntity seems to be like the best way to handle entities, not using packets. I just converted from using packets to createEntity in my Citizens remake.
     
    Kenn Fatt likes this.
  6. Kenn Fatt

    Kenn Fatt Slime

    Messages:
    82
    GitHub:
    kennfatt
    but now its really bad using Entity::createEntity(), i cant handle the movement. its just spawning an entity for me
     
  7. Kenn Fatt

    Kenn Fatt Slime

    Messages:
    82
    GitHub:
    kennfatt
    is it good?
     
  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.