docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct PhysicsStep

    Parameters describing how to step the physics world. If none is present in the scene, default values will be used.

    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 PhysicsStep : IComponentData, IQueryTypeParameter

    Fields

    CollisionTolerance

    The collision tolerance specifies the minimum distance required for contacts between rigid bodies to be created.

    This value can be increased if undesired collision tunneling is observed in the simulation.

    Declaration
    public float CollisionTolerance
    Field Value
    Type Description
    float

    Default

    (Immutable) the default.

    Declaration
    public static readonly PhysicsStep Default
    Field Value
    Type Description
    PhysicsStep

    Gravity

    The gravity.

    Declaration
    public float3 Gravity
    Field Value
    Type Description
    float3

    IncrementalDynamicBroadphase

    Flag indicating whether the dynamic broadphase is built incrementally. Enabling this option will update the dynamic broadphase incrementally whenever changes between simulation steps occur, potentially leading to time savings for cases with many dynamic rigid bodies that don't move or otherwise change.

    Declaration
    public bool IncrementalDynamicBroadphase
    Field Value
    Type Description
    bool

    IncrementalStaticBroadphase

    Flag indicating whether the static broadphase is built incrementally.

    Enabling this option will update the static broadphase incrementally whenever changes between simulation steps occur, potentially leading to time savings for cases with many static rigid bodies that don't move or otherwise change.

    Declaration
    public bool IncrementalStaticBroadphase
    Field Value
    Type Description
    bool

    MultiThreaded

    Flag indicating whether the simulation will run multi-threaded.

    Declaration
    public byte MultiThreaded
    Field Value
    Type Description
    byte

    SimulationType

    Type of the simulation.

    Declaration
    public SimulationType SimulationType
    Field Value
    Type Description
    SimulationType

    SolverIterationCount

    Number of Gauss-Seidel solver iterations.

    Declaration
    public int SolverIterationCount
    Field Value
    Type Description
    int

    SolverStabilizationHeuristicSettings

    The global solver stabilization heuristic settings.

    Declaration
    public Solver.StabilizationHeuristicSettings SolverStabilizationHeuristicSettings
    Field Value
    Type Description
    Solver.StabilizationHeuristicSettings

    SubstepCount

    Number of substeps.

    Declaration
    public int SubstepCount
    Field Value
    Type Description
    int

    SynchronizeCollisionWorld

    Whether to synchronize collision world after physics step to enable precise query results. Note that BuildPhysicsWorld will do this work on the following frame anyway, so only use this option when another system must know about the results of the simulation before the end of the frame (e.g., to destroy or create some other body that must be present in the following frame). In most cases, tolerating a frame of latency is easier to work with and is better for performance.

    Declaration
    public byte SynchronizeCollisionWorld
    Field Value
    Type Description
    byte

    Implements

    IComponentData
    IQueryTypeParameter
    In This Article
    Back to top
    Copyright © 2025 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)