{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Struct CompoundCollider | Unity Physics | 1.1.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct CompoundCollider

    A collider containing instances of other colliders.

    Implements
    ICollider
    ICollidable
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Unity.Physics
    Assembly: solution.dll
    Syntax
    public struct CompoundCollider : ICollider, ICollidable

    Properties

    Name Description
    Children

    Gets the children.

    CollisionType

    Gets the collision type.

    MassProperties

    Gets the mass properties.

    MemorySize

    Gets the memory size (including children).

    NumChildren

    Gets the number of children.

    NumColliderKeyBits

    Gets the number of collider key bits.

    Type

    Gets the type.

    Methods

    Name Description
    BoxCast(float3, quaternion, float3, float3, float, out ColliderCastHit, CollisionFilter, QueryInteraction)

    Box cast.

    BoxCast(float3, quaternion, float3, float3, float, CollisionFilter, QueryInteraction)

    Box cast.

    BoxCastAll(float3, quaternion, float3, float3, float, ref NativeList<ColliderCastHit>, CollisionFilter, QueryInteraction)

    Box cast all.

    BoxCastCustom<T>(float3, quaternion, float3, float3, float, ref T, CollisionFilter, QueryInteraction)

    Box cast custom.

    CalculateAabb()

    Calculates the aabb.

    CalculateAabb(RigidTransform, float)

    Calculates the aabb.

    CalculateDistance(ColliderDistanceInput)

    Calculate the distance from another collider to this one.

    CalculateDistance(ColliderDistanceInput, ref NativeList<DistanceHit>)

    Calculates the distance.

    CalculateDistance(ColliderDistanceInput, out DistanceHit)

    Calculates the distance.

    CalculateDistance(PointDistanceInput)

    Calculate the distance from a point to this collider.

    CalculateDistance(PointDistanceInput, ref NativeList<DistanceHit>)

    Calculates the distance.

    CalculateDistance(PointDistanceInput, out DistanceHit)

    Calculates the distance.

    CalculateDistance<T>(ColliderDistanceInput, ref T)

    Calculates the distance.

    CalculateDistance<T>(PointDistanceInput, ref T)

    Calculates the distance.

    CapsuleCast(float3, float3, float, float3, float, out ColliderCastHit, CollisionFilter, QueryInteraction)

    Capsule cast.

    CapsuleCast(float3, float3, float, float3, float, CollisionFilter, QueryInteraction)

    Capsule cast.

    CapsuleCastAll(float3, float3, float, float3, float, ref NativeList<ColliderCastHit>, CollisionFilter, QueryInteraction)

    Capsule cast all.

    CapsuleCastCustom<T>(float3, float3, float, float3, float, ref T, CollisionFilter, QueryInteraction)

    Capsule cast custom.

    CastCollider(ColliderCastInput)

    Cast another collider against this one.

    CastCollider(ColliderCastInput, ref NativeList<ColliderCastHit>)

    Cast collider.

    CastCollider(ColliderCastInput, out ColliderCastHit)

    Cast collider.

    CastCollider<T>(ColliderCastInput, ref T)

    Cast collider.

    CastRay(RaycastInput)

    Cast a ray against this collider.

    CastRay(RaycastInput, ref NativeList<RaycastHit>)

    Cast ray.

    CastRay(RaycastInput, out RaycastHit)

    Cast ray.

    CastRay<T>(RaycastInput, ref T)

    Cast ray.

    CheckBox(float3, quaternion, float3, CollisionFilter, QueryInteraction)

    Check box.

    CheckCapsule(float3, float3, float, CollisionFilter, QueryInteraction)

    Check capsule.

    CheckSphere(float3, float, CollisionFilter, QueryInteraction)

    Check if the sphere is overlapping this collider.

    ConvertChildIndexToColliderKey(int)

    An utility method that converts child index to collider key.

    Create(NativeArray<ColliderBlobInstance>)

    Create a compound collider containing an array of other colliders. The source colliders are copied into the compound, so that it becomes one blob.

    GetChild(ref ColliderKey, out ChildCollider)

    Gets a child of this collider.

    GetColliderKeyToChildrenMapping(ref NativeHashMap<ColliderKey, ChildCollider>)

    Fills the passed in map with ColliderKey - ChildCollider pairs of this compound collider.

    GetCollisionFilter()

    Get the root level filter that can be used for a quick dismiss of the collision/query. Individual children can have their own collision filters for further filtering. This filter is a union of all child filters.

    GetCollisionFilter(ColliderKey)

    Gets the collision filter of the child specified by the collider key.

    GetLeaf(ColliderKey, out ChildCollider)

    Gets a leaf collider.

    GetLeaves<T>(ref T)

    Gets the leaf colliders of this collider .

    OverlapBox(float3, quaternion, float3, ref NativeList<DistanceHit>, CollisionFilter, QueryInteraction)

    Overlap box.

    OverlapBoxCustom<T>(float3, quaternion, float3, ref T, CollisionFilter, QueryInteraction)

    Overlap box custom.

    OverlapCapsule(float3, float3, float, ref NativeList<DistanceHit>, CollisionFilter, QueryInteraction)

    Overlap capsule.

    OverlapCapsuleCustom<T>(float3, float3, float, ref T, CollisionFilter, QueryInteraction)

    Overlap capsule custom.

    OverlapSphere(float3, float, ref NativeList<DistanceHit>, CollisionFilter, QueryInteraction)

    Overlap sphere.

    OverlapSphereCustom<T>(float3, float, ref T, CollisionFilter, QueryInteraction)

    Overlap sphere custom.

    RefreshCollisionFilter()

    Refreshes combined collision filter of all children. Should be called when child collision filter changes.

    SetCollisionFilter(CollisionFilter)

    Sets the root collision filter. This also sets the filter of all children to the input value.

    SetCollisionFilter(CollisionFilter, ColliderKey)

    Sets collision filter of the child specified by collider key. If the provided key is empty, it will set the root filter and the filter of all children to the provided value. If the filter is invalid, it will throw an exception. After setting the child filter, this function will also call RefreshCollisionFilter() to update the root filter based on the new child filter value.

    SetCollisionFilter(CollisionFilter, ColliderKey, bool)

    Sets collision filter of the child specified by collider key. If the provided key is empty, it will set the root filter and the filter of all children to the provided value. If the filter is invalid, it will throw an exception. If refreshCompoundFilter is set to false, this function will not call RefreshCollisionFilter(), and should be used in cases of updating multiple child colliders at once, where you will need to call RefreshCollisionFilter() manually after the last child filter is updated.

    SphereCast(float3, float, float3, float, out ColliderCastHit, CollisionFilter, QueryInteraction)

    Sphere cast.

    SphereCast(float3, float, float3, float, CollisionFilter, QueryInteraction)

    Sphere cast.

    SphereCastAll(float3, float, float3, float, ref NativeList<ColliderCastHit>, CollisionFilter, QueryInteraction)

    Sphere cast all.

    SphereCastCustom<T>(float3, float, float3, float, ref T, CollisionFilter, QueryInteraction)

    Sphere cast custom.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)