Class GraphicalSmoothingUtility
Utility functions for smoothing the motion of rigid bodies' graphical representations when physics steps at a lower frequency than rendering.
Inherited Members
Namespace: Unity.Physics.GraphicsIntegration
Assembly: solution.dll
Syntax
public static class GraphicalSmoothingUtility
Methods
Name | Description |
---|---|
BuildLocalToWorld(int, RigidTransform, float, bool, NativeArray<PostTransformMatrix>) | Construct a |
Extrapolate(in RigidTransform, in PhysicsVelocity, in PhysicsMass, float) | Compute a simple extrapolated transform for the graphical representation of a rigid body using its
|
Interpolate(in RigidTransform, in RigidTransform, float) | Compute a simple interpolated transform for the graphical representation of a rigid body between
(Note that for cartoons, an animator would use squash and stretch to force a body to make contact even if it is technically not hitting on a specific frame.) See InterpolateUsingVelocity(in RigidTransform, in PhysicsVelocity, in PhysicsVelocity, in PhysicsMass, float, float) for an alternative approach. |
InterpolateUsingVelocity(in RigidTransform, in PhysicsVelocity, in PhysicsVelocity, in PhysicsMass, float, float) | Compute an interpolated transform for the graphical representation of a rigid body between its previous transform and current transform, integrating forward using an interpolated velocity value.
This method tries to achieve a compromise between the visual artifacts of Interpolate(in RigidTransform, in RigidTransform, float) and Extrapolate(in RigidTransform, in PhysicsVelocity, in PhysicsMass, float).
While integrating forward using |