Polarith AI
1.8
RaycastGizmo Class Reference

Description

Used to visualize a ray that is cast into the scene to sense something.

The ray itself is displayed as a line and a possible hit is displayed by a solid sphere. This class is serializable so that it is suitable for the direct use in MonoBehaviour instances supporting Unity's inspector.

Public Fields

bool Enabled = false
 Determines whether this gizmo is enabled. More...
 
Color Color = Color.cyan
 The color of the drawn line. More...
 
Color HitColor = Color.magenta
 The color of the sphere that is displayed if the ray hit something. More...
 
float Size = 0.2f
 Defines the size of the shown gizmos. More...
 

Public Methods

void DrawRay (Vector3 position, Vector3 direction)
 Display the actual ray as a line with the set Color. More...
 
void DrawRay (Vector3 position, Vector3 localDirection, Quaternion rotation)
 Display the actual ray as a line with the set Color. More...
 
void DrawRayHit (Vector3 position)
 Displays a solid sphere at the given position that is used to indicate a raycast hit. More...
 
Imprint