{!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 ColliderAspect | Unity Physics | 1.1.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct ColliderAspect

    A collider aspect. Contains transform data and a collider.

    Implements
    IAspect
    IQueryTypeParameter
    IAspectQueryable
    ICollidable
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetType()
    Namespace: Unity.Physics.Aspects
    Assembly: solution.dll
    Syntax
    public readonly struct ColliderAspect : IAspect, IQueryTypeParameter, IAspectQueryable, ICollidable

    Fields

    Name Description
    Entity

    The entity of this aspect.

    Properties

    Name Description
    Collider

    Gets or sets the collider.

    CollisionType

    Gets the collision type.

    Position

    Gets or sets the world space position.

    Rotation

    Gets or sets the world space rotation.

    Scale

    Gets or sets the uniform scale.

    Type

    Gets the collider type.

    WorldFromCollider

    Gets or sets the world transform of a collider aspect.

    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 of this aspect in world space.

    CalculateDistance(in ColliderAspect, float, ref NativeList<DistanceHit>, QueryInteraction)

    Calculates the distance from the input aspect.

    CalculateDistance(in ColliderAspect, float, out DistanceHit, QueryInteraction)

    Calculates the distance from the input aspect.

    CalculateDistance(in ColliderAspect, float, QueryInteraction)

    Calculates the distance from the input aspect.

    CalculateDistance(ColliderDistanceInput)

    Calculates the distance.

    CalculateDistance(ColliderDistanceInput, ref NativeList<DistanceHit>)

    Calculates the distance.

    CalculateDistance(ColliderDistanceInput, out DistanceHit)

    Calculates the distance.

    CalculateDistance(PointDistanceInput)

    Calculates the distance.

    CalculateDistance(PointDistanceInput, ref NativeList<DistanceHit>)

    Calculates the distance.

    CalculateDistance(PointDistanceInput, out DistanceHit)

    Calculates the distance.

    CalculateDistance<T>(in ColliderAspect, float, ref T, QueryInteraction)

    Calculates the distance from the input aspect.

    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(in ColliderAspect, float3, float, ref NativeList<ColliderCastHit>, QueryInteraction)

    Cast another collider aspect against this one.

    CastCollider(in ColliderAspect, float3, float, out ColliderCastHit, QueryInteraction)

    Cast another collider aspect against this one.

    CastCollider(in ColliderAspect, float3, float, QueryInteraction)

    Cast another collider aspect against this one.

    CastCollider(ColliderCastInput)

    Cast collider.

    CastCollider(ColliderCastInput, ref NativeList<ColliderCastHit>)

    Cast collider.

    CastCollider(ColliderCastInput, out ColliderCastHit)

    Cast collider.

    CastCollider<T>(in ColliderAspect, float3, float, ref T, QueryInteraction)

    Cast another collider aspect against this one.

    CastCollider<T>(ColliderCastInput, ref T)

    Cast collider.

    CastRay(RaycastInput)

    Cast ray.

    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)

    Checks if a sphere overlaps with this body.

    ConvertChildIndexToColliderKey(int)

    Convert child index to collider key.

    GetColliderKeyToChildrenMapping(ref NativeHashMap<ColliderKey, ChildCollider>)

    Has effect only if the collider is a CompoundCollider. Fills the passed in map with ColliderKey - ChildCollider pairs of the compound collider.

    GetCollisionFilter()

    Get the collision filter. In case of a CompoundCollider, returns the root filter.

    GetCollisionFilter(ColliderKey)

    Gets the collision filter specified by the collider key. The key is only read in case the collider is CompoundCollider, otherwise it is ignored and will behave as GetCollisionFilter().

    GetCollisionResponse()

    Gets the collision response. In case of a CompoundCollider, this behaves as GetCollisionResponse(ColliderKey) with ColliderKey.Zero passed in.

    GetCollisionResponse(ColliderKey)

    Gets collision response of a child specified by the collider key. Collider key is only read in case of CompoundCollider, otherwise it is ignored and will behave as GetCollisionResponse() . In case of CompoundCollider if the colider key is empty, it will return the collision response of the first child.

    GetFriction()

    Gets the friction. In case of a CompoundCollider, this behaves as GetFriction(ColliderKey) with ColliderKey.Zero passed in.

    GetFriction(ColliderKey)

    Gets the friction of a child specified by the collider key. Collider key is only read in case of CompoundCollider, otherwise it is ignored and will behave as GetFriction() . In case of CompoundCollider if the colider key is empty, it will return the friction of the first child.

    GetNumberOfChildren()

    Gets the children of this collider aspect.

    GetRestitution()

    Gets the restitution. In case of a CompoundCollider, this behaves as GetRestitution(ColliderKey) with ColliderKey.Zero passed in.

    GetRestitution(ColliderKey)

    Gets a restitution of a child specified by the collider key. Collider key is only read in case of CompoundCollider, otherwise it is ignored and will behave as GetRestitution() . In case of CompoundCollider if the colider key is empty, it will return the restitution of the first child.

    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.

    SetCollisionFilter(CollisionFilter)

    Sets the collision filter. In case of a CompoundCollider sets the root filter.

    SetCollisionFilter(CollisionFilter, ColliderKey)

    Sets the collision filter of a child specified by the collider key. Collider key is only read in case of CompoundCollider, otherwise it is ignored and will behave as SetCollisionFilter(CollisionFilter)

    SetCollisionResponse(CollisionResponsePolicy)

    Sets collision response. In case of a CompoundCollider, this behaves as SetCollisionResponse(CollisionResponsePolicy, ColliderKey) with ColliderKey.Zero passed in.

    SetCollisionResponse(CollisionResponsePolicy, ColliderKey)

    Sets collision response of a child specified by the collider key. Collider key is only read in case of CompoundCollider, otherwise it is ignored and will behave as SetCollisionResponse(CollisionResponsePolicy) . In case of CompoundCollider if the collider key is empty, it will set the collision response of the all children.

    SetFriction(float)

    Sets the friction. In case of a CompoundCollider, this behaves as SetFriction(float, ColliderKey) with ColliderKey.Zero passed in.

    SetFriction(float, ColliderKey)

    Sets the friction of a child specified by the collider key. Collider key is only read in case of CompoundCollider, otherwise it is ignored and will behave as SetFriction(float) . In case of CompoundCollider if the collider key is empty, it will set the friction of the all children.

    SetRestitution(float)

    Sets the restitution. In case of a CompoundCollider, this behaves as SetRestitution(float, ColliderKey) with ColliderKey.Zero passed in.

    SetRestitution(float, ColliderKey)

    Sets the restitution of a child specified by the collider key. Collider key is only read in case of CompoundCollider, otherwise it is ignored and will behave as SetRestitution(float) . In case of CompoundCollider if the collider key is empty, it will set the restitution of the all children.

    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)