Struct Collider
Syntax
public struct Collider : ICompositeCollider, ICollider, ICollidable
Properties
CollisionType
Declaration
public readonly CollisionType CollisionType { get; }
Property Value
Implements
Filter
Declaration
public CollisionFilter Filter { get; set; }
Property Value
Implements
MassProperties
Declaration
public readonly MassProperties MassProperties { get; }
Property Value
Implements
MemorySize
Declaration
public readonly int MemorySize { get; }
Property Value
Implements
NumColliderKeyBits
Declaration
public readonly uint NumColliderKeyBits { get; }
Property Value
TotalNumColliderKeyBits
Declaration
public readonly uint TotalNumColliderKeyBits { get; }
Property Value
Type
Declaration
public readonly ColliderType Type { get; }
Property Value
Implements
Methods
BoxCast(float3, quaternion, float3, float3, Single, out ColliderCastHit, CollisionFilter, QueryInteraction)
Declaration
public bool BoxCast(float3 center, quaternion orientation, float3 halfExtents, float3 direction, float maxDistance, out ColliderCastHit hitInfo, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
Parameters
Returns
Implements
BoxCast(float3, quaternion, float3, float3, Single, CollisionFilter, QueryInteraction)
Declaration
public bool BoxCast(float3 center, quaternion orientation, float3 halfExtents, float3 direction, float maxDistance, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
Parameters
Returns
Implements
BoxCastAll(float3, quaternion, float3, float3, Single, ref NativeList<ColliderCastHit>, CollisionFilter, QueryInteraction)
Declaration
public bool BoxCastAll(float3 center, quaternion orientation, float3 halfExtents, float3 direction, float maxDistance, ref NativeList<ColliderCastHit> outHits, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
Parameters
Returns
Implements
BoxCastCustom<T>(float3, quaternion, float3, float3, Single, ref T, CollisionFilter, QueryInteraction)
Declaration
public bool BoxCastCustom<T>(float3 center, quaternion orientation, float3 halfExtents, float3 direction, float maxDistance, ref T collector, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
where T : struct, ICollector<ColliderCastHit>
Parameters
Returns
Type Parameters
Implements
CalculateAabb()
Declaration
public Aabb CalculateAabb()
Returns
Implements
Declaration
public Aabb CalculateAabb(RigidTransform transform)
Parameters
Returns
Implements
Declaration
public bool CalculateDistance(ColliderDistanceInput input)
Parameters
Returns
Implements
Declaration
public bool CalculateDistance(ColliderDistanceInput input, ref NativeList<DistanceHit> allHits)
Parameters
Returns
Implements
Declaration
public bool CalculateDistance(ColliderDistanceInput input, out DistanceHit closestHit)
Parameters
Returns
Implements
Declaration
public bool CalculateDistance(PointDistanceInput input)
Parameters
Returns
Implements
Declaration
public bool CalculateDistance(PointDistanceInput input, ref NativeList<DistanceHit> allHits)
Parameters
Returns
Implements
Declaration
public bool CalculateDistance(PointDistanceInput input, out DistanceHit closestHit)
Parameters
Returns
Implements
Declaration
public bool CalculateDistance<T>(ColliderDistanceInput input, ref T collector)
where T : struct, ICollector<DistanceHit>
Parameters
Returns
Type Parameters
Implements
Declaration
public bool CalculateDistance<T>(PointDistanceInput input, ref T collector)
where T : struct, ICollector<DistanceHit>
Parameters
Returns
Type Parameters
Implements
CapsuleCast(float3, float3, Single, float3, Single, out ColliderCastHit, CollisionFilter, QueryInteraction)
Declaration
public bool CapsuleCast(float3 point1, float3 point2, float radius, float3 direction, float maxDistance, out ColliderCastHit hitInfo, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
Parameters
Returns
Implements
CapsuleCast(float3, float3, Single, float3, Single, CollisionFilter, QueryInteraction)
Declaration
public bool CapsuleCast(float3 point1, float3 point2, float radius, float3 direction, float maxDistance, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
Parameters
Returns
Implements
CapsuleCastAll(float3, float3, Single, float3, Single, ref NativeList<ColliderCastHit>, CollisionFilter, QueryInteraction)
Declaration
public bool CapsuleCastAll(float3 point1, float3 point2, float radius, float3 direction, float maxDistance, ref NativeList<ColliderCastHit> outHits, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
Parameters
Returns
Implements
CapsuleCastCustom<T>(float3, float3, Single, float3, Single, ref T, CollisionFilter, QueryInteraction)
Declaration
public bool CapsuleCastCustom<T>(float3 point1, float3 point2, float radius, float3 direction, float maxDistance, ref T collector, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
where T : struct, ICollector<ColliderCastHit>
Parameters
Returns
Type Parameters
Implements
Declaration
public bool CastCollider(ColliderCastInput input)
Parameters
Returns
Implements
Declaration
public bool CastCollider(ColliderCastInput input, ref NativeList<ColliderCastHit> allHits)
Parameters
Returns
Implements
Declaration
public bool CastCollider(ColliderCastInput input, out ColliderCastHit closestHit)
Parameters
Returns
Implements
Declaration
public bool CastCollider<T>(ColliderCastInput input, ref T collector)
where T : struct, ICollector<ColliderCastHit>
Parameters
Returns
Type Parameters
Implements
Declaration
public bool CastRay(RaycastInput input)
Parameters
Returns
Implements
Declaration
public bool CastRay(RaycastInput input, ref NativeList<RaycastHit> allHits)
Parameters
Returns
Implements
Declaration
public bool CastRay(RaycastInput input, out RaycastHit closestHit)
Parameters
Returns
Implements
Declaration
public bool CastRay<T>(RaycastInput input, ref T collector)
where T : struct, ICollector<RaycastHit>
Parameters
Returns
Type Parameters
Implements
CheckBox(float3, quaternion, float3, CollisionFilter, QueryInteraction)
Declaration
public bool CheckBox(float3 center, quaternion orientation, float3 halfExtents, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
Parameters
Returns
Implements
CheckCapsule(float3, float3, Single, CollisionFilter, QueryInteraction)
Declaration
public bool CheckCapsule(float3 point1, float3 point2, float radius, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
Parameters
Returns
Implements
CheckSphere(float3, Single, CollisionFilter, QueryInteraction)
Declaration
public bool CheckSphere(float3 position, float radius, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
Parameters
Returns
Implements
Clone()
This function clones the Collider and wraps it in a BlobAssetReference.
The caller is responsible for appropriately calling Dispose
on the result.
Declaration
public BlobAssetReference<Collider> Clone()
Returns
GetChild(ref ColliderKey, out ChildCollider)
Declaration
public bool GetChild(ref ColliderKey key, out ChildCollider child)
Parameters
Returns
GetLeaf(ColliderKey, out ChildCollider)
Declaration
public bool GetLeaf(ColliderKey key, out ChildCollider leaf)
Parameters
Returns
Declaration
public static bool GetLeafCollider(Collider*root, RigidTransform rootTransform, ColliderKey key, out ChildCollider leaf)
Parameters
Returns
GetLeaves<T>(ref T)
Declaration
public void GetLeaves<T>([NoAlias] ref T collector)
where T : struct, ILeafColliderCollector
Parameters
Type |
Name |
Description |
T |
collector |
|
Type Parameters
OverlapBox(float3, quaternion, float3, ref NativeList<DistanceHit>, CollisionFilter, QueryInteraction)
Declaration
public bool OverlapBox(float3 center, quaternion orientation, float3 halfExtents, ref NativeList<DistanceHit> outHits, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
Parameters
Returns
Implements
OverlapBoxCustom<T>(float3, quaternion, float3, ref T, CollisionFilter, QueryInteraction)
Declaration
public bool OverlapBoxCustom<T>(float3 center, quaternion orientation, float3 halfExtents, ref T collector, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
where T : struct, ICollector<DistanceHit>
Parameters
Returns
Type Parameters
Implements
OverlapCapsule(float3, float3, Single, ref NativeList<DistanceHit>, CollisionFilter, QueryInteraction)
Declaration
public bool OverlapCapsule(float3 point1, float3 point2, float radius, ref NativeList<DistanceHit> outHits, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
Parameters
Returns
Implements
OverlapCapsuleCustom<T>(float3, float3, Single, ref T, CollisionFilter, QueryInteraction)
Declaration
public bool OverlapCapsuleCustom<T>(float3 point1, float3 point2, float radius, ref T collector, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
where T : struct, ICollector<DistanceHit>
Parameters
Returns
Type Parameters
Implements
OverlapSphere(float3, Single, ref NativeList<DistanceHit>, CollisionFilter, QueryInteraction)
Declaration
public bool OverlapSphere(float3 position, float radius, ref NativeList<DistanceHit> outHits, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
Parameters
Returns
Implements
OverlapSphereCustom<T>(float3, Single, ref T, CollisionFilter, QueryInteraction)
Declaration
public bool OverlapSphereCustom<T>(float3 position, float radius, ref T collector, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
where T : struct, ICollector<DistanceHit>
Parameters
Returns
Type Parameters
Implements
SphereCast(float3, Single, float3, Single, out ColliderCastHit, CollisionFilter, QueryInteraction)
Declaration
public bool SphereCast(float3 origin, float radius, float3 direction, float maxDistance, out ColliderCastHit hitInfo, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
Parameters
Returns
Implements
SphereCast(float3, Single, float3, Single, CollisionFilter, QueryInteraction)
Declaration
public bool SphereCast(float3 origin, float radius, float3 direction, float maxDistance, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
Parameters
Returns
Implements
SphereCastAll(float3, Single, float3, Single, ref NativeList<ColliderCastHit>, CollisionFilter, QueryInteraction)
Declaration
public bool SphereCastAll(float3 origin, float radius, float3 direction, float maxDistance, ref NativeList<ColliderCastHit> outHits, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
Parameters
Returns
Implements
SphereCastCustom<T>(float3, Single, float3, Single, ref T, CollisionFilter, QueryInteraction)
Declaration
public bool SphereCastCustom<T>(float3 origin, float radius, float3 direction, float maxDistance, ref T collector, CollisionFilter filter, QueryInteraction queryInteraction = QueryInteraction.Default)
where T : struct, ICollector<ColliderCastHit>
Parameters
Returns
Type Parameters
Implements