Description
The PreviousRay
property of the Gizmo
class provides access to the ray that was used in the previous frame. This is useful for tracking changes in raycasting operations over time, such as when implementing interactive tools or visualizations that rely on ray-based input.
Usage
Use the PreviousRay
property to retrieve the ray from the previous frame. This can be particularly useful in scenarios where you need to compare the current ray with the previous one to detect changes or movements.
Example
// Example of using PreviousRay in a Gizmo context
Ray previousRay = Gizmo.PreviousRay;
// Use the previous ray for comparison or calculations
if (previousRay != Gizmo.CurrentRay)
{
// Perform actions based on the change in ray
// For example, update a visual indicator or handle input differently
}