Namespace Unity.Physics.GraphicsIntegration | Unity Physics | 0.5.1-preview.2
docs.unity3d.com
    Show / Hide Table of Contents

    Namespace Unity.Physics.GraphicsIntegration

    Classes

    BufferInterpolatedRigidBodiesMotion

    A system that writes to a rigid body's PhysicsGraphicalInterpolationBuffer component by copying its Translation, Rotation, and PhysicsVelocity before physics steps. These values are used for bodies whose graphics representations will be interpolated by the SmoothRigidBodiesGraphicalMotion system. Add a WriteGroupAttribute to your own component if you need to use different values (as with a character controller).

    NOTE: Consider the case when an interpolated rigid body needs to be teleported (i.e. have its Translation, Rotation or PhysicsVelocity components changed directly), specifically after this system is updated and before SmoothRigidBodiesGraphicalMotion is updated. In that case, you should set associated ApplySmoothing to 0. or assign the appropriate new PhysicsGraphicalInterpolationBuffer component values as well.

    CopyPhysicsVelocityToSmoothing

    A system that writes to a body's PhysicsGraphicalSmoothing component by copying its PhysicsVelocity after physics has stepped. These values are used for bodies whose graphics representations will be smoothed by the SmoothRigidBodiesGraphicalMotion system. Add a WriteGroupAttribute to your own component if you need to use a different value (as with a character controller).

    GraphicalSmoothingUtility

    Utility functions for smoothing the motion of rigid bodies' graphical representations when physics steps at a lower frequency than rendering.

    RecordMostRecentFixedTime

    A system to keep track of the time values in the most recent tick of the FixedStepSimulationSystemGroup.

    SmoothRigidBodiesGraphicalMotion

    A system that can smooth out the motion of rigid bodies if the fixed physics tick rate is slower than the variable graphics framerate. Each affected body's LocalToWorld is adjusted before rendering, but its underlying Translation and Rotation values are left alone.

    Structs

    PhysicsGraphicalInterpolationBuffer

    Stores the state of a rigid body from the previous physics tick in order to interpolate the motion of the body's graphical representation. When used in conjunction with PhysicsGraphicalSmoothing, it indicates that smoothing should interpolate between the two most recent physics simulation ticks. The result is thus a more accurate representation of the physics simulation, but is one tick behind.

    PhysicsGraphicalSmoothing

    A component to indicate that the graphical representation of a dynamic rigid body's motion should be smoothed when the rendering framerate is greater than the fixed step rate used by physics. When used on its own, it indicates that smoothing should extrapolate into the future based on the body's current velocity. The result is thus up-to-date, but can mis-predict the body's transformations since any future collision response has not yet been resolved. Note that when used, the values of the body's LocalToWorld matrix are modified, and may differ from those of its Translation and Rotation components. See also PhysicsGraphicalInterpolationBuffer.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023