InertiaTranslationBehavior2D.DesiredDisplacement 属性

定义

获取或设置对象沿速度向量移动所需的以坐标单位表示的绝对距离。Gets or sets the absolute distance that the object needs to travel along the velocity vector, in coordinate units.

public:
 property float DesiredDisplacement { float get(); void set(float value); };
public float DesiredDisplacement { get; set; }
member this.DesiredDisplacement : single with get, set
Public Property DesiredDisplacement As Single

属性值

Single

对象沿速度向量移动所需的以坐标单位表示的绝对距离。The absolute distance that the object needs to travel along the velocity vector, in coordinate units.

注解

此属性值与属性互相排斥 DesiredDeceleration ; 设置此属性将设置 DesiredDecelerationNaNThis property value is mutually exclusive with the DesiredDeceleration property; setting this property will set DesiredDeceleration to NaN. 此属性和属性的默认值 DesiredDecelerationNaNThe default value for both this property and DesiredDeceleration property is NaN. 在惯性处理开始之前,必须设置一个属性或另一个属性。You must set one or the other property before inertia processing starts.

DesiredDisplacement 必须是有限的非负数。DesiredDisplacement must be a finite, non-negative number. 位移方向沿 InitialVelocityXInitialVelocityY 向量。The direction of displacement is along the InitialVelocityX and InitialVelocityY vector.

当惯性处理器正在运行时,不能设置此属性;否则,将引发异常。This property cannot be set while the inertia processor is running; otherwise, an exception is thrown.

适用于