Raycast Gizmos visualizer
1.0
|
Casts the box along a ray and returns detailed information on what was hit. More...
Public Member Functions | |
BoxCastData (Ray _ray, float _maxDistance, Vector3 _halfExtends, Quaternion _localRotation) | |
BoxCastData (Vector3 _origin, Vector3 _halfExtends, Vector3 _direction, Quaternion _localRotation=default(Quaternion), float _maxDistance=Mathf.Infinity) | |
bool | BoxCast (Vector3 _center, Vector3 _halfExtends, Vector3 _direction, Quaternion _orientation=default(Quaternion), float _maxDistance=Mathf.Infinity, int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal) |
Casts the box along a ray and returns detailed information on what was hit. More... | |
bool | BoxCast (int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal) |
Casts the box along a ray and returns detailed information on what was hit. More... | |
int | BoxCastNonAlloc (Vector3 _center, Vector3 _halfExtends, Vector3 _direction, RaycastHit[] hits, Quaternion _orientation=default(Quaternion), float _maxDistance=Mathf.Infinity, int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal) |
Cast the box along the direction, and store hits in the provided buffer. More... | |
int | BoxCastNonAlloc (RaycastHit[] hits, int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal) |
Cast the box along the direction, and store hits in the provided buffer. More... | |
void | DrawGizmos (Color color=default(Color), Color hitColor=default(Color)) |
Provide vizualize information (Gizmos) More... | |
void | DrawAllGizmos (ref RaycastHit[] raycastHits, int validArraySize, Color color=default(Color), Color hitColor=default(Color)) |
Provide vizualize information (Gizmos) More... | |
void | Update (Vector3 _center, Vector3 _halfExtends, Vector3 _direction, Quaternion _orientation, float _maxDistance) |
Update parameters More... | |
void | Update (Vector3 _center, Vector3 _direction, float _maxDistance) |
Update parameters More... | |
void | Reset () |
Reset parameters More... | |
override string | ToString () |
Provide vizualize information (Gizmos) More... | |
Vector3 | GetRayEndPoint () |
Get hit end point or point on max distance. More... | |
Public Attributes | |
Vector3 | center |
Center of the box. More... | |
Vector3 | halfExtends |
Half the size of the box in each dimension. More... | |
Vector3 | direction |
The direction in which to cast the box. More... | |
float | maxDistance |
The max length of the cast. More... | |
Quaternion | orientation |
Rotation of the box. More... | |
Properties | |
static BoxCastData | NONE [get] |
RaycastHit | hitResult [get, set] |
hit result cached from last physics check. More... | |
bool | hitted [get] |
bool, True if last physics result are hit. More... | |
int | hitCount [get] |
hit count from last physics check. More... | |
Casts the box along a ray and returns detailed information on what was hit.
Kit.Physic.BoxCastData.BoxCastData | ( | Ray | _ray, |
float | _maxDistance, | ||
Vector3 | _halfExtends, | ||
Quaternion | _localRotation | ||
) |
Kit.Physic.BoxCastData.BoxCastData | ( | Vector3 | _origin, |
Vector3 | _halfExtends, | ||
Vector3 | _direction, | ||
Quaternion | _localRotation = default(Quaternion) , |
||
float | _maxDistance = Mathf.Infinity |
||
) |
bool Kit.Physic.BoxCastData.BoxCast | ( | Vector3 | _center, |
Vector3 | _halfExtends, | ||
Vector3 | _direction, | ||
Quaternion | _orientation = default(Quaternion) , |
||
float | _maxDistance = Mathf.Infinity , |
||
int | layerMask = Physics.DefaultRaycastLayers , |
||
QueryTriggerInteraction | queryTriggerInteraction = QueryTriggerInteraction.UseGlobal |
||
) |
Casts the box along a ray and returns detailed information on what was hit.
_center | Center of the box. |
_halfExtends | Half the size of the box in each dimension. |
_direction | The direction in which to cast the box. |
_orientation | Rotation of the box. |
_maxDistance | The max length of the cast. |
layerMask | A Layer mask that is used to selectively ignore colliders when casting a box. |
queryTriggerInteraction | Specifies whether this query should hit Triggers. |
Referenced by Kit.Physic.RaycastHelper.GetCurrentStruct().
bool Kit.Physic.BoxCastData.BoxCast | ( | int | layerMask = Physics.DefaultRaycastLayers , |
QueryTriggerInteraction | queryTriggerInteraction = QueryTriggerInteraction.UseGlobal |
||
) |
Casts the box along a ray and returns detailed information on what was hit.
layerMask | A Layer mask that is used to selectively ignore colliders when casting a box. |
queryTriggerInteraction | Specifies whether this query should hit Triggers. |
int Kit.Physic.BoxCastData.BoxCastNonAlloc | ( | Vector3 | _center, |
Vector3 | _halfExtends, | ||
Vector3 | _direction, | ||
RaycastHit [] | hits, | ||
Quaternion | _orientation = default(Quaternion) , |
||
float | _maxDistance = Mathf.Infinity , |
||
int | layerMask = Physics.DefaultRaycastLayers , |
||
QueryTriggerInteraction | queryTriggerInteraction = QueryTriggerInteraction.UseGlobal |
||
) |
Cast the box along the direction, and store hits in the provided buffer.
_center | Center of the box. |
_halfExtends | Half the size of the box in each dimension. |
_direction | The direction in which to cast the box. |
_hitInfo | output RaycastHit |
_orientation | Rotation of the box. |
_maxDistance | The max length of the cast. |
hits | The buffer to store the results in. |
layerMask | A Layer mask that is used to selectively ignore colliders when casting a box. |
queryTriggerInteraction | Specifies whether this query should hit Triggers |
Referenced by Kit.Physic.RaycastHelper.GetCurrentStruct().
int Kit.Physic.BoxCastData.BoxCastNonAlloc | ( | RaycastHit [] | hits, |
int | layerMask = Physics.DefaultRaycastLayers , |
||
QueryTriggerInteraction | queryTriggerInteraction = QueryTriggerInteraction.UseGlobal |
||
) |
Cast the box along the direction, and store hits in the provided buffer.
hits | The buffer to store the results in. |
layerMask | A Layer mask that is used to selectively ignore colliders when casting a box. |
queryTriggerInteraction | Specifies whether this query should hit Triggers |
to define it's being hit, hitted
void Kit.Physic.BoxCastData.DrawAllGizmos | ( | ref RaycastHit [] | raycastHits, |
int | validArraySize, | ||
Color | color = default(Color) , |
||
Color | hitColor = default(Color) |
||
) |
Provide vizualize information (Gizmos)
raycastHits | The cached array of Raycast result. |
validArraySize | The cached hit count from result. |
color | main color of Gizmos |
hitColor | hit color of Gizmos |
Implements Kit.Physic.IRayAllStruct.
Referenced by Kit.Physic.RaycastHelper.GetCurrentStruct().
void Kit.Physic.BoxCastData.DrawGizmos | ( | Color | color = default(Color) , |
Color | hitColor = default(Color) |
||
) |
Provide vizualize information (Gizmos)
color | main color of Gizmos |
hitColor | hit color of Gizmos |
Implements Kit.Physic.IRayStruct.
Referenced by Kit.Physic.RaycastHelper.GetCurrentStruct().
Vector3 Kit.Physic.BoxCastData.GetRayEndPoint | ( | ) |
Get hit end point or point on max distance.
void Kit.Physic.BoxCastData.Reset | ( | ) |
Reset parameters
Implements Kit.Physic.IRayStructBase.
Referenced by Kit.Physic.RaycastHelper.GetCurrentStruct().
override string Kit.Physic.BoxCastData.ToString | ( | ) |
Provide vizualize information (Gizmos)
Implements Kit.Physic.IRayStructBase.
void Kit.Physic.BoxCastData.Update | ( | Vector3 | _center, |
Vector3 | _halfExtends, | ||
Vector3 | _direction, | ||
Quaternion | _orientation, | ||
float | _maxDistance | ||
) |
Update parameters
_center | Center of the box. |
_halfExtends | Half the size of the box in each dimension. |
_direction | The direction in which to cast the box. |
_orientation | Rotation of the box. |
_maxDistance | The max length of the cast. |
void Kit.Physic.BoxCastData.Update | ( | Vector3 | _center, |
Vector3 | _direction, | ||
float | _maxDistance | ||
) |
Update parameters
_center | Center of the box. |
_direction | The direction in which to cast the box. |
_maxDistance | The max length of the cast. |
Vector3 Kit.Physic.BoxCastData.center |
Center of the box.
Vector3 Kit.Physic.BoxCastData.direction |
The direction in which to cast the box.
Vector3 Kit.Physic.BoxCastData.halfExtends |
Half the size of the box in each dimension.
float Kit.Physic.BoxCastData.maxDistance |
The max length of the cast.
Quaternion Kit.Physic.BoxCastData.orientation |
Rotation of the box.
|
get |
hit count from last physics check.
|
getset |
hit result cached from last physics check.
Referenced by Kit.Physic.RaycastHelper.GetCurrentStruct().
|
get |
bool, True if last physics result are hit.
Referenced by Kit.Physic.RaycastHelper.CheckPhysic(), and Kit.Physic.RaycastHelper.GetCurrentStruct().
|
staticget |