The CurrentRay
property of the Gizmo
class provides the current ray being used by the gizmo system. This ray is typically used for operations such as hit testing or determining the direction of user interactions within the 3D space.
The CurrentRay
property of the Gizmo
class provides the current ray being used by the gizmo system. This ray is typically used for operations such as hit testing or determining the direction of user interactions within the 3D space.
Use the CurrentRay
property to access the current ray in the gizmo system. This is useful for determining where in the 3D space the user is interacting, such as when selecting or manipulating objects.
// Example of using the CurrentRay property Ray currentRay = Gizmo.CurrentRay; // Use the currentRay for hit testing or other operations Vector3 hitPoint; if (Physics.Raycast(currentRay, out hitPoint)) { // Perform operations with the hit point Debug.Log($"Hit point: {hitPoint}"); }