static Vector3 VectorPlaneProject( Vector3& v, Vector3& planeNormal )

robot_2Generated
code_blocksInput

Description

The Vector3.VectorPlaneProject method projects a vector onto a plane defined by a normal vector. This is useful for determining the component of a vector that lies within a plane, effectively removing the component of the vector that is perpendicular to the plane.

Usage

To use the Vector3.VectorPlaneProject method, provide the vector you want to project and the normal of the plane onto which you want to project the vector. Both parameters are passed by reference.

Example

// Example usage of Vector3.VectorPlaneProject
Vector3 vector = new Vector3(3, 4, 5);
Vector3 planeNormal = new Vector3(0, 1, 0); // Plane normal pointing up

Vector3 projectedVector = Vector3.VectorPlaneProject(ref vector, ref planeNormal);

// projectedVector now contains the component of 'vector' that lies in the plane
// defined by 'planeNormal'. In this case, it removes the Y component.