Description
The Gizmo.Nudge
method is a static utility function that calculates a new Vector3
position based on a given rotation and a directional input. This method is useful for adjusting or nudging an object's position in 3D space according to a specified rotation and 2D directional input.
Usage
To use the Gizmo.Nudge
method, you need to provide a Rotation
object that represents the current orientation and a Vector2
that specifies 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); // Nudge to the right
Vector3 newPosition = Gizmo.Nudge(currentRotation, direction);
// newPosition now contains the adjusted position based on the given rotation and direction.