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

    Show / Hide Table of Contents

    Class PhysicsComponentExtensions

    Utility functions acting on physics components.

    Inheritance
    object
    PhysicsComponentExtensions
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Unity.Physics.Extensions
    Assembly: solution.dll
    Syntax
    public static class PhysicsComponentExtensions

    Methods

    Name Description
    ApplyAngularImpulse(ref PhysicsVelocity, in PhysicsMass, float, in float3)

    Applies the angular impulse.

    ApplyAngularImpulse(ref PhysicsVelocity, in PhysicsMass, in float3)

    Applies the angular impulse.

    ApplyExplosionForce(ref PhysicsVelocity, in PhysicsMass, in PhysicsCollider, in float3, in quaternion, float, in float3, in float, in float, in float3, in float, ForceMode)

    Converts a force into an impulse based on the force mode and the bodies mass and inertia properties. Equivalent to UnityEngine.Rigidbody.AddExplosionForce. ExplosionFilter is set to CollisionFilter.Default Assumes that there is no scale. ApplyExplosionForce(ref PhysicsVelocity, PhysicsMass, PhysicsCollider, float3, quaternion, float, float, float3, float, float, float3, CollisionFilter,float, ForceMode)

    ApplyExplosionForce(ref PhysicsVelocity, in PhysicsMass, in PhysicsCollider, in float3, in quaternion, in float, float, in float3, in float, in float, in float3, in CollisionFilter, in float, ForceMode)

    Converts a force into an impulse based on the force mode and the bodies mass and inertia properties. Equivalent to UnityEngine.Rigidbody.AddExplosionForce.

    ApplyImpulse(ref PhysicsVelocity, in PhysicsMass, in float3, in quaternion, float, in float3, in float3)

    Applies the impulse.

    ApplyImpulse(ref PhysicsVelocity, in PhysicsMass, in float3, in quaternion, in float3, in float3)

    Applies the impulse.

    ApplyLinearImpulse(ref PhysicsVelocity, in PhysicsMass, float, in float3)

    Applies the linear impulse.

    ApplyLinearImpulse(ref PhysicsVelocity, in PhysicsMass, in float3)

    Applies the linear impulse.

    ApplyScale(in PhysicsMass, float)

    Scale the mass of the body using provided scale.

    GetAngularVelocityWorldSpace(in PhysicsVelocity, in PhysicsMass, in quaternion)

    Get the world-space angular velocity of a rigid body.

    GetCenterOfMassWorldSpace(in PhysicsMass, float, in float3, in quaternion)

    Get the center of mass in world space.

    GetCenterOfMassWorldSpace(in PhysicsMass, in float3, in quaternion)

    Get the center of mass in world space. Assumes that there is no scale.

    GetEffectiveMass(in PhysicsMass, in float3, in quaternion, in float, float3, float3)

    Get a body's effective mass in a given direction and from a particular point in world space.

    GetEffectiveMass(in PhysicsMass, in float3, in quaternion, float3, float3)

    Get a body's effective mass in a given direction and from a particular point in world space.

    GetImpulseFromForce(in PhysicsMass, float, in float3, in ForceMode, in float, out float3, out PhysicsMass)

    Converts a force into an impulse based on the force mode and the bodies mass and inertia properties, and scale.

    GetImpulseFromForce(in PhysicsMass, in float3, in ForceMode, in float, out float3, out PhysicsMass)

    Converts a force into an impulse based on the force mode and the bodies mass and inertia properties. Assumes that there is no scale. GetImpulseFromForce(in PhysicsMass, float, in float3, in ForceMode, in float, out float3, out PhysicsMass)

    GetLinearVelocity(in PhysicsVelocity, PhysicsMass, float3, quaternion, float3)

    Get the linear velocity of a rigid body at a given point (in world space)

    Integrate(in PhysicsVelocity, in PhysicsMass, float, ref float3, ref quaternion)

    Compute a future position and orientation for a dynamic rigid body based on its current trajectory, after a specified amount of time.

    MakeUnique(ref PhysicsCollider, in Entity, EntityCommandBuffer)

    Makes this collider unique if this is not already the case.

    MakeUnique(ref PhysicsCollider, in Entity, ParallelWriter, int)

    Makes this collider unique if this is not already the case. This function can be used in a job.

    MakeUnique(ref PhysicsCollider, in Entity, EntityManager)

    Makes this collider unique if this is not already the case.

    SetAngularVelocityWorldSpace(ref PhysicsVelocity, in PhysicsMass, in quaternion, in float3)

    Set the world-space angular velocity of a rigid body.

    SetCenterOfMassWorldSpace(ref PhysicsMass, in float3, in quaternion, float3)

    Set the center of mass in world space.

    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)