Comments and answers for "How can i move my camera forward independent of its pitch?"
http://answers.unity.com/questions/1141232/how-can-i-move-my-camera-forward-independent-of-it.html
The latest comments and answers for the question "How can i move my camera forward independent of its pitch?"Answer by TreyH
http://answers.unity.com/answers/1141257/view.html
Easily: If you're using this to move the camera in a forward direction along the y-axis,
// Get the forward vector along a constrained Y-Space
Vector3 ConstrainedForward(Transform focus)
{
// Get the natural forward transition
Vector3 naturalForward = focus.forward;
// Nullify its y-component
naturalForward.y = 0;
// Normalize xz-plane and align it with the chosen y-axis
Vector3 fixedForward = naturalForward.normalized;
// This gives us a vector whose xz-planar speed is normalized
// while preserving the fixed Y component
return fixedForward;
}Sat, 13 Feb 2016 00:26:17 GMTTreyH