Raycast Gizmos visualizer
1.0
|
A helper class for switch between raycast and overlap. include Gizmos call for debug usage. More...
Classes | |
class | HitEvent |
Public Types | |
enum | eRayType { eRayType.Raycast = 0, eRayType.RaycastAll, eRayType.SphereCast = 10, eRayType.SphereCastAll, eRayType.SphereOverlap, eRayType.CapsuleCast = 15, eRayType.CapsuleCastAll, eRayType.CapsuleOverlap, eRayType.BoxCast = 20, eRayType.BoxCastAll, eRayType.BoxOverlap } |
enum | eDebugMethod { eDebugMethod.None = 0, eDebugMethod.OnDrawGizmos = 1, eDebugMethod.OnDrawGizmosSelected = 2 } |
Public Member Functions | |
bool | CheckPhysic (bool forceUpdate=false) |
Unity Physic, if current raycastData hit anything. More... | |
IEnumerable< Collider > | GetOverlapColliders () |
Get colliders which are overlap the preset area. only work on Overlap type. More... | |
IEnumerable< RaycastHit > | GetRaycastHits () |
Get RaycastHits which are touching the preset area. only work on Raycast All type. More... | |
void | SetMemorySize (int size) |
Set memory size based on current selected structure. More... | |
IRayStructBase | GetCurrentStruct () |
Get current selected structure based on selected eRayType More... | |
Public Attributes | |
float | m_Distance = 1f |
Vector3 | m_LocalPosition = Vector3.zero |
float | m_Radius = 1f |
Vector3 | m_LocalPoint1 = Vector3.left |
Vector3 | m_LocalPoint2 = Vector3.right |
Vector3 | m_LocalRotation = Vector3.zero |
Vector3 | m_HalfExtends = new Vector3(.5f, .5f, .5f) |
bool | m_UnSyncRotation = false |
bool | m_FixedUpdate = true |
LayerMask | m_LayerMask = Physics.DefaultRaycastLayers |
QueryTriggerInteraction | m_QueryTriggerInteraction = QueryTriggerInteraction.UseGlobal |
bool | m_DebugLog = false |
HitEvent | OnHit |
const string | ZERO_MEMORY = "You alloced \"0\" memory size, this action will always return empty list." |
Properties | |
eRayType | RayType [get, set] |
int | m_HittedCount [get] |
A helper class for switch between raycast and overlap. include Gizmos call for debug usage.
|
strong |
|
strong |
bool Kit.Physic.RaycastHelper.CheckPhysic | ( | bool | forceUpdate = false | ) |
Unity Physic, if current raycastData hit anything.
forceUpdate | for the case you need to update more then one time within same fixedUpdate, e.g. change position |
References Kit.Physic.SphereOverlapData.hitted, Kit.Physic.CapsuleOverlapData.hitted, Kit.Physic.BoxOverlapData.hitted, Kit.Physic.SphereCastData.hitted, Kit.Physic.BoxCastData.hitted, and Kit.Physic.CapsuleCastData.hitted.
IRayStructBase Kit.Physic.RaycastHelper.GetCurrentStruct | ( | ) |
Get current selected structure based on selected eRayType
References Kit.Physic.BoxCastData.BoxCast(), Kit.Physic.BoxCastData.BoxCastNonAlloc(), Kit.Physic.CapsuleCastData.CapsuleCast(), Kit.Physic.CapsuleCastData.CapsuleCastNonAlloc(), Kit.Physic.SphereCastData.DrawAllGizmos(), Kit.Physic.BoxCastData.DrawAllGizmos(), Kit.Physic.CapsuleCastData.DrawAllGizmos(), Kit.Physic.SphereCastData.DrawGizmos(), Kit.Physic.BoxCastData.DrawGizmos(), Kit.Physic.CapsuleCastData.DrawGizmos(), Kit.Physic.SphereOverlapData.DrawOverlapGizmos(), Kit.Physic.CapsuleOverlapData.DrawOverlapGizmos(), Kit.Physic.BoxOverlapData.DrawOverlapGizmos(), Kit.Physic.SphereCastData.hitResult, Kit.Physic.BoxCastData.hitResult, Kit.Physic.CapsuleCastData.hitResult, Kit.Physic.SphereCastData.hitted, Kit.Physic.BoxCastData.hitted, Kit.Physic.CapsuleCastData.hitted, Kit.Physic.SphereOverlapData.OverlapNonAlloc(), Kit.Physic.BoxOverlapData.OverlapNonAlloc(), Kit.Physic.CapsuleOverlapData.OverlapNonAlloc(), Kit.Physic.SphereOverlapData.Reset(), Kit.Physic.BoxOverlapData.Reset(), Kit.Physic.CapsuleOverlapData.Reset(), Kit.Physic.SphereCastData.Reset(), Kit.Physic.BoxCastData.Reset(), Kit.Physic.CapsuleCastData.Reset(), Kit.Physic.SphereCastData.SphereCast(), and Kit.Physic.SphereCastData.SphereCastNonAlloc().
IEnumerable<Collider> Kit.Physic.RaycastHelper.GetOverlapColliders | ( | ) |
Get colliders which are overlap the preset area. only work on Overlap type.
IEnumerable<RaycastHit> Kit.Physic.RaycastHelper.GetRaycastHits | ( | ) |
Get RaycastHits which are touching the preset area. only work on Raycast All type.
void Kit.Physic.RaycastHelper.SetMemorySize | ( | int | size | ) |
Set memory size based on current selected structure.
size | size of memory to alloc. |
bool Kit.Physic.RaycastHelper.m_DebugLog = false |
float Kit.Physic.RaycastHelper.m_Distance = 1f |
bool Kit.Physic.RaycastHelper.m_FixedUpdate = true |
Vector3 Kit.Physic.RaycastHelper.m_HalfExtends = new Vector3(.5f, .5f, .5f) |
LayerMask Kit.Physic.RaycastHelper.m_LayerMask = Physics.DefaultRaycastLayers |
Vector3 Kit.Physic.RaycastHelper.m_LocalPoint1 = Vector3.left |
Vector3 Kit.Physic.RaycastHelper.m_LocalPoint2 = Vector3.right |
Vector3 Kit.Physic.RaycastHelper.m_LocalPosition = Vector3.zero |
Vector3 Kit.Physic.RaycastHelper.m_LocalRotation = Vector3.zero |
QueryTriggerInteraction Kit.Physic.RaycastHelper.m_QueryTriggerInteraction = QueryTriggerInteraction.UseGlobal |
float Kit.Physic.RaycastHelper.m_Radius = 1f |
bool Kit.Physic.RaycastHelper.m_UnSyncRotation = false |
HitEvent Kit.Physic.RaycastHelper.OnHit |
const string Kit.Physic.RaycastHelper.ZERO_MEMORY = "You alloced \"0\" memory size, this action will always return empty list." |
|
get |
|
getset |