Description
The GetMouseDistanceDelta
method calculates the change in distance of the mouse cursor from a specified position on a plane defined by a normal vector. This method is useful for determining how much the mouse has moved in relation to a specific point in 3D space, which can be particularly useful in scenarios involving 3D manipulation or interaction within a scene.
Usage
To use the GetMouseDistanceDelta
method, provide a Vector3
representing the position on the plane and another Vector3
representing the normal of the plane. The method will return a float
value indicating the change in distance of the mouse cursor from the specified position.
Example
// Example usage of GetMouseDistanceDelta
Vector3 position = new Vector3(0, 0, 0); // The position on the plane
Vector3 planeNormal = new Vector3(0, 1, 0); // The normal of the plane
float distanceDelta = Gizmo.GetMouseDistanceDelta(position, planeNormal);
// Use the distanceDelta for further calculations or logic