|
| CapsuleCastData (Vector3 _point1, Vector3 _point2, float _radius, Vector3 _direction, float _maxDistance) |
| Casts a capsule against all colliders in the scene and returns detailed information on what was hit. The capsule is defined by the two spheres with radius around point1 and point2, which form the two ends of the capsule.Hits are returned for the first collider which would collide against this capsule if the capsule was moved along direction. This is useful when a Raycast does not give enough precision, because you want to find out if an object of a specific size, such as a character, will be able to move somewhere without colliding with anything on the way. Notes: CapsuleCast will not detect colliders for which the capsule overlaps the collider. More...
|
|
bool | CapsuleCast (Vector3 _point1, Vector3 _point2, float _radius, Vector3 _direction, float _maxDistance, int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal) |
| Casts a capsule against all colliders in the scene and returns detailed information on what was hit. The capsule is defined by the two spheres with radius around point1 and point2, which form the two ends of the capsule.Hits are returned for the first collider which would collide against this capsule if the capsule was moved along direction. This is useful when a Raycast does not give enough precision, because you want to find out if an object of a specific size, such as a character, will be able to move somewhere without colliding with anything on the way. Notes: CapsuleCast will not detect colliders for which the capsule overlaps the collider. More...
|
|
bool | CapsuleCast (int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal) |
| Casts a capsule against all colliders in the scene and returns detailed information on what was hit. The capsule is defined by the two spheres with radius around point1 and point2, which form the two ends of the capsule.Hits are returned for the first collider which would collide against this capsule if the capsule was moved along direction. This is useful when a Raycast does not give enough precision, because you want to find out if an object of a specific size, such as a character, will be able to move somewhere without colliding with anything on the way. Notes: CapsuleCast will not detect colliders for which the capsule overlaps the collider. More...
|
|
int | CapsuleCastNonAlloc (Vector3 _point1, Vector3 _point2, float _radius, Vector3 _direction, RaycastHit[] hits, float _maxDistance=Mathf.Infinity, int layerMask=Physics.DefaultRaycastLayers, QueryTriggerInteraction queryTriggerInteraction=QueryTriggerInteraction.UseGlobal) |
| Casts a capsule against all colliders in the scene and returns detailed information on what was hit into the buffer. Like Physics.CapsuleCastAll, but generates no garbage. More...
|
|
int | CapsuleCastNonAlloc (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 _point1, Vector3 _point2, float _radius, Vector3 _direction, float _maxDistance) |
| Update parameters More...
|
|
void | Reset () |
| Reset parameters More...
|
|
override string | ToString () |
| Provide vizualize information (Gizmos) More...
|
|
Vector3 [] | GetEndPoints (float _distance) |
| Get hit end point or point on max distance. More...
|
|
Structure wrapper for Capsulecast
bool Kit.Physic.CapsuleCastData.CapsuleCast |
( |
Vector3 |
_point1, |
|
|
Vector3 |
_point2, |
|
|
float |
_radius, |
|
|
Vector3 |
_direction, |
|
|
float |
_maxDistance, |
|
|
int |
layerMask = Physics.DefaultRaycastLayers , |
|
|
QueryTriggerInteraction |
queryTriggerInteraction = QueryTriggerInteraction.UseGlobal |
|
) |
| |
Casts a capsule against all colliders in the scene and returns detailed information on what was hit. The capsule is defined by the two spheres with radius around point1 and point2, which form the two ends of the capsule.Hits are returned for the first collider which would collide against this capsule if the capsule was moved along direction. This is useful when a Raycast does not give enough precision, because you want to find out if an object of a specific size, such as a character, will be able to move somewhere without colliding with anything on the way. Notes: CapsuleCast will not detect colliders for which the capsule overlaps the collider.
- Parameters
-
_point1 | The center of the sphere at the start of the capsule. |
_point2 | The center of the sphere at the end of the capsule. |
_radius | The radius of the capsule. |
_direction | The direction into which to sweep the capsule. |
_maxDistance | The max length of the sweep. |
layerMask | A Layer mask that is used to selectively ignore colliders when casting a capsule. |
queryTriggerInteraction | Specifies whether this query should hit Triggers. |
- Returns
- bool True when the capsule sweep intersects any collider, otherwise false.
- See also
- https://docs.unity3d.com/ScriptReference/Physics.CapsuleCast.html
Referenced by Kit.Physic.RaycastHelper.GetCurrentStruct().
int Kit.Physic.CapsuleCastData.CapsuleCastNonAlloc |
( |
Vector3 |
_point1, |
|
|
Vector3 |
_point2, |
|
|
float |
_radius, |
|
|
Vector3 |
_direction, |
|
|
RaycastHit [] |
hits, |
|
|
float |
_maxDistance = Mathf.Infinity , |
|
|
int |
layerMask = Physics.DefaultRaycastLayers , |
|
|
QueryTriggerInteraction |
queryTriggerInteraction = QueryTriggerInteraction.UseGlobal |
|
) |
| |
Casts a capsule against all colliders in the scene and returns detailed information on what was hit into the buffer. Like Physics.CapsuleCastAll, but generates no garbage.
- Parameters
-
_point1 | The center of the sphere at the start of the capsule. |
_point2 | The center of the sphere at the end of the capsule. |
_radius | The radius of the capsule. |
_direction | The direction into which to sweep the capsule. |
_maxDistance | The max length of the sweep. |
layerMask | A Layer mask that is used to selectively ignore colliders when casting a capsule. |
queryTriggerInteraction | Specifies whether this query should hit Triggers. |
- Returns
- int The amount of hits stored into the buffer.
- See also
- https://docs.unity3d.com/ScriptReference/Physics.CapsuleCast.html
summary>Casts a capsule against all colliders in the scene and returns detailed information on what was hit into the buffer. Like Physics.CapsuleCastAll, but generates no garbage.
- Parameters
-
layerMask | A Layer mask that is used to selectively ignore colliders when casting a capsule. |
queryTriggerInteraction | Specifies whether this query should hit Triggers. |
- Returns
- int The amount of hits stored into the buffer.
- See also
- https://docs.unity3d.com/ScriptReference/Physics.CapsuleCast.html
Referenced by Kit.Physic.RaycastHelper.GetCurrentStruct().