Hello, I was wondering if I can make an entity move, preferably to follow you, for example, I create a user entity or NPC and then I want to make it move and followed the user him, is there any way to do this?
The function to make mobs move is ->addMotion(v3) With some calculations you can get the rotation angle right too, basically cosinus and sinus (cos sin). Search the web for triangular calculations Gravity is done automatically, just jumping must be implemented maybe. Speed calculation can be done by multiplying the motion vector with a speed value. Take a look at MyPets for example code