public static Vector3 RotateY(this Vector3 v, float angle) { float sin = Mathf.Sin(angle); float cos = Mathf.Cos(angle); float tx = v.x; float tz = v.z; v.x = (cos * tx) + (sin * tz); v.z = (cos * tz) - (sin * tx); return v; }