public function getMyPitch(Vector3 $from, Vector3 $to)
{
$distance = $from->distance($to);
$height = $to->y - $from->y;
if ($height > 0) {
return -rad2deg(asin($height / $distance));
} elseif ($height < 0) {
return rad2deg(asin(-$height / $distance));
} else {
return 0;
}
}