static Vector3 GetMouseDelta( Vector3 position, Vector3 planeNormal )

robot_2Generated
code_blocksInput

Description

The GetMouseDelta method calculates the change in mouse position on a specified plane. This is useful for determining how much the mouse has moved in a 3D space relative to a given plane, which can be particularly useful in scenarios involving 3D modeling or manipulation of objects in a virtual environment.

Usage

To use the GetMouseDelta method, provide the position on the plane and the normal vector of the plane. The method will return a Vector3 representing the delta of the mouse movement on that plane.

Example

// Example usage of GetMouseDelta
Vector3 position = new Vector3(0, 0, 0); // Position on the plane
Vector3 planeNormal = new Vector3(0, 1, 0); // Normal of the plane

Vector3 mouseDelta = Gizmo.GetMouseDelta(position, planeNormal);

// Use the mouseDelta for further processing, such as moving an object
// object.Position += mouseDelta;