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

    Show / Hide Table of Contents

    Struct PhysicsWorldSingleton

    The physics world singleton. Use it to access the PhysicsWorld used by simulation. If you want read only access to the world, use (SystemBase|SystemAPI|EntityQuery).GetSingleton<PhysicsWorldSingleton>(). If you want read write access to the world, use (SystemBase|SystemAPI|EntityQuery).GetSingletonRW< PhysicsWorldSingleton>().

    Implements
    IComponentData
    IQueryTypeParameter
    ICollidable
    IAspectQueryable
    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 PhysicsWorldSingleton : IComponentData, IQueryTypeParameter, ICollidable, IAspectQueryable

    Fields

    Name Description
    PhysicsWorld

    The physics world.

    PhysicsWorldIndex

    The PhysicsWorldIndex.

    Properties

    Name Description
    Bodies

    Gets the bodies.

    CollisionWorld

    Gets the collision world.

    DynamicBodies

    Gets the dynamic bodies.

    DynamicsWorld

    Gets the dynamics world.

    Joints

    Gets the joints.

    MotionDatas

    Gets the motion datas.

    MotionVelocities

    Gets the motion velocities.

    NumBodies

    Gets the number of bodies.

    NumDynamicBodies

    Gets the number of dynamic bodies.

    NumJoints

    Gets the number of joints.

    NumStaticBodies

    Gets the number of static bodies.

    StaticBodies

    Gets the static bodies.

    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.

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

    Calculates the distance from an aspect.

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

    Calculates the distance from an aspect.

    CalculateDistance(in ColliderAspect, float, QueryInteraction)

    Calculates the distance from an 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 an 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 an aspect against this PhysicsWorldSingleton.

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

    Cast an aspect against this PhysicsWorldSingleton.

    CastCollider(in ColliderAspect, float3, float, QueryInteraction)

    Cast an aspect against this PhysicsWorldSingleton.

    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 an aspect against this PhysicsWorldSingleton.

    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)

    Check sphere.

    GetJointIndex(Entity)

    Gets the zero-based index of the joint.

    GetRigidBodyIndex(Entity)

    Gets the zero-based index of the rigid body.

    OverlapAabb(OverlapAabbInput, ref NativeList<int>)

    Overlap aabb.

    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.

    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)