public static void RotateX(this Vector3 v, float angle) { float sin = Mathf.Sin(angle); float cos = Mathf.Cos(angle); float ty = v.y; float tz = v.z; v.y = (cos * ty) - (sin * tz); v.z = (cos * tz) + (sin * ty); }