hi i learned trigonometry but i dont know e.g. how many ° is when player is facing X+ and how many ° is when facing Z+
var_dump($player->getYaw()); Shows the degrees the player is facing. Warning: it may be out of range of 0-360 degrees, but just use ($yaw % 360) to normalize it. Warning: sin(), cos() and tan() accept parameters in radians. Use deg2rad (or / 180 * M_PI before PHP 7 if you want to make it run faster) to convert degrees to radians.