Description
The Gizmo.Nudge
method calculates a new Vector3
position based on a given rotation and a directional input. This method is useful for determining how an object should be moved or adjusted in 3D space when a directional input is applied, taking into account the current rotation of the object.
Usage
To use the Gizmo.Nudge
method, provide a Rotation
object representing the current orientation of the object and a Vector2
representing the direction in which you want to nudge the object. The method will return a Vector3
that represents the new position after applying the nudge.
Example
// Example usage of Gizmo.Nudge
Rotation currentRotation = new Rotation(0, 90, 0); // Example rotation
Vector2 direction = new Vector2(1, 0); // Example direction to nudge
Vector3 newPosition = Gizmo.Nudge(currentRotation, direction);
// newPosition now contains the adjusted position based on the rotation and direction