docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct PhysicsMassOverride

    Add this component to a dynamic body if it needs to sometimes switch to being kinematic. This allows you to retain its dynamic mass properties on its PhysicsMass component, but have the physics solver temporarily treat it as if it were kinematic. Kinematic bodies will have infinite mass and inertia. They should also not be affected by gravity. Hence, if IsKinematic is non-zero the value in an associated PhysicsGravityFactor component is also ignored. If SetVelocityToZero is non-zero then the value in an associated PhysicsVelocity component is also ignored.

    Implements
    IComponentData
    IQueryTypeParameter
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    ValueType.ToString()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Unity.Physics
    Assembly: Unity.Physics.dll
    Syntax
    public struct PhysicsMassOverride : IComponentData, IQueryTypeParameter

    Fields

    IsKinematic

    The is kinematic flag.

    Declaration
    public byte IsKinematic
    Field Value
    Type Description
    byte

    SetVelocityToZero

    The set velocity to zero flag.

    Declaration
    public byte SetVelocityToZero
    Field Value
    Type Description
    byte

    Implements

    Unity.Entities.IComponentData
    Unity.Entities.IQueryTypeParameter
    In This Article
    Back to top
    Copyright © 2024 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)