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#
PHP: /** DataPacketSendEvent */if($event->getPacket() instanceof MoveEntityPacket){ $p = $event->getPacket(); $target = $event->getPlayer(); $p->x = $target->x; $p->y = $target->y; $p->z = $target->z; $p->yaw = $target->yaw; $p->headYaw = $target->yaw; $p->pitch = $target->pitch; }
there is already an on-going thread about entity motion found here https://forums.pmmp.io/threads/entity-follows-player.708/ which would probably be of some use.
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.
but now its really bad using Entity::createEntity(), i cant handle the movement. its just spawning an entity for me