Struct BufferInterpolatedRigidBodiesMotion
A system that writes to a rigid body's PhysicsGraphicalInterpolationBuffer
component by copying its Unity.Transforms.LocalTransform 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 Unity.Transforms.LocalTransform 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.
Inherited Members
Namespace: Unity.Physics.GraphicsIntegration
Assembly: Unity.Physics.dll
Syntax
[RequireMatchingQueriesForUpdate]
[UpdateInGroup(typeof(PhysicsSystemGroup))]
[UpdateAfter(typeof(PhysicsInitializeGroup))]
[UpdateBefore(typeof(ExportPhysicsWorld))]
[BurstCompile]
public struct BufferInterpolatedRigidBodiesMotion : ISystem, ISystemCompilerGenerated
Properties
InterpolatedDynamicBodiesQuery
An entity query matching dynamic rigid bodies whose graphical motion should be interpolated.
Declaration
public readonly EntityQuery InterpolatedDynamicBodiesQuery { get; }
Property Value
Type | Description |
---|---|
EntityQuery |