Version: 2023.2

RigidbodyInterpolation

enumeration

切换到手册

描述

Rigidbody 插值模式。

Interpolation calculates the pose of a Rigidbody in frames that fall between physics timestep updates, to reduce the appearance of visible jitter. It is particularly useful for player character GameObjects, and any other GameObject that the camera follows. By default, interpolation is disabled. When interpolation or extrapolation is enabled, the physics system takes control of the Rigidbody's transform. For this reason, you should follow any direct (non-physics) change to the transform with a Physics.SyncTransforms call. Otherwise, Unity ignores any transform change that does not originate from the physics system.

对于有摄像机跟随的主要角色或车辆,建议 使用插值。对于任意其他刚体,不建议使用插值。

另请参阅:Rigidbody.interpolation

变量

None不使用插值。
Interpolate插值将始终滞后一点,但比外推更流畅。
Extrapolate外推将根据当前速度预测刚体的位置。