Raycast Gizmos visualizer
1.0
|
Structure wrapper for SphereCast More...
Public Member Functions | |
SphereCastData (Vector3 _origin, Vector3 _direction, float _distance, float _radius) | |
SphereCastData (Ray _ray, float _distance, float _radius) | |
bool | SphereCast (Vector3 _origin, float _radius, Vector3 _direction, float _maxDistance, int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal) |
Casts a sphere along a ray and returns detailed information on what was hit. Notes: SphereCast will not detect colliders for which the sphere overlaps the collider. More... | |
bool | SphereCast (int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal) |
Casts a sphere along a ray and returns detailed information on what was hit. Notes: SphereCast will not detect colliders for which the sphere overlaps the collider. More... | |
int | SphereCastNonAlloc (Vector3 _origin, float _radius, Vector3 _direction, float _maxDistance, RaycastHit[] hits, int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal) |
int | SphereCastNonAlloc (RaycastHit[] hits, int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal) |
void | DrawGizmos (Color color, Color hitColor) |
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 _origin, float _radius, 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 | origin |
The center of the sphere at the start of the sweep. More... | |
float | radius |
The radius of the sphere. More... | |
Vector3 | direction |
The direction into which to sweep the sphere. More... | |
float | maxDistance |
The max length of the cast. More... | |
Properties | |
static SphereCastData | 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... | |
Structure wrapper for SphereCast
Kit.Physic.SphereCastData.SphereCastData | ( | Vector3 | _origin, |
Vector3 | _direction, | ||
float | _distance, | ||
float | _radius | ||
) |
Kit.Physic.SphereCastData.SphereCastData | ( | Ray | _ray, |
float | _distance, | ||
float | _radius | ||
) |
void Kit.Physic.SphereCastData.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.SphereCastData.DrawGizmos | ( | Color | color, |
Color | hitColor | ||
) |
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.SphereCastData.GetRayEndPoint | ( | ) |
Get hit end point or point on max distance.
void Kit.Physic.SphereCastData.Reset | ( | ) |
Reset parameters
Implements Kit.Physic.IRayStructBase.
Referenced by Kit.Physic.RaycastHelper.GetCurrentStruct().
bool Kit.Physic.SphereCastData.SphereCast | ( | Vector3 | _origin, |
float | _radius, | ||
Vector3 | _direction, | ||
float | _maxDistance, | ||
int | layerMask = Physics.DefaultRaycastLayers , |
||
QueryTriggerInteraction | queryTriggerInteraction = QueryTriggerInteraction.UseGlobal |
||
) |
Casts a sphere along a ray and returns detailed information on what was hit. Notes: SphereCast will not detect colliders for which the sphere overlaps the collider.
_origin | The center of the sphere at the start of the sweep. |
_radius | The radius of the sphere. |
_direction | The direction into which to sweep the sphere. |
_maxDistance | The max length of the cast. |
layerMask | A Layer mask that is used to selectively ignore colliders when casting a sphere. |
queryTriggerInteraction | Specifies whether this query should hit Triggers. |
Referenced by Kit.Physic.RaycastHelper.GetCurrentStruct().
bool Kit.Physic.SphereCastData.SphereCast | ( | int | layerMask = Physics.DefaultRaycastLayers , |
QueryTriggerInteraction | queryTriggerInteraction = QueryTriggerInteraction.UseGlobal |
||
) |
Casts a sphere along a ray and returns detailed information on what was hit. Notes: SphereCast will not detect colliders for which the sphere overlaps the collider.
layerMask | A Layer mask that is used to selectively ignore colliders when casting a sphere. |
queryTriggerInteraction | Specifies whether this query should hit Triggers. |
int Kit.Physic.SphereCastData.SphereCastNonAlloc | ( | Vector3 | _origin, |
float | _radius, | ||
Vector3 | _direction, | ||
float | _maxDistance, | ||
RaycastHit [] | hits, | ||
int | layerMask = Physics.DefaultRaycastLayers , |
||
QueryTriggerInteraction | queryTriggerInteraction = QueryTriggerInteraction.UseGlobal |
||
) |
Referenced by Kit.Physic.RaycastHelper.GetCurrentStruct().
int Kit.Physic.SphereCastData.SphereCastNonAlloc | ( | RaycastHit [] | hits, |
int | layerMask = Physics.DefaultRaycastLayers , |
||
QueryTriggerInteraction | queryTriggerInteraction = QueryTriggerInteraction.UseGlobal |
||
) |
to define it's being hit, hitted
override string Kit.Physic.SphereCastData.ToString | ( | ) |
Provide vizualize information (Gizmos)
Implements Kit.Physic.IRayStructBase.
void Kit.Physic.SphereCastData.Update | ( | Vector3 | _origin, |
float | _radius, | ||
Vector3 | _direction, | ||
float | _maxDistance | ||
) |
Update parameters
_origin | The center of the sphere at the start of the sweep. |
_radius | The radius of the sphere. |
_direction | The direction into which to sweep the sphere. |
_maxDistance | The max length of the cast. |
Vector3 Kit.Physic.SphereCastData.direction |
The direction into which to sweep the sphere.
float Kit.Physic.SphereCastData.maxDistance |
The max length of the cast.
Vector3 Kit.Physic.SphereCastData.origin |
The center of the sphere at the start of the sweep.
float Kit.Physic.SphereCastData.radius |
The radius of the sphere.
|
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 |