แก้ไข

แชร์ผ่าน


InertiaTranslationBehavior2D.DesiredDisplacement Property

Definition

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

Property Value

The absolute distance that the object needs to travel along the velocity vector, in coordinate units.

Remarks

This property value is mutually exclusive with the DesiredDeceleration property; setting this property will set DesiredDeceleration to NaN. The default value for both this property and DesiredDeceleration property is NaN. You must set one or the other property before inertia processing starts.

DesiredDisplacement must be a finite, non-negative number. 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.

Applies to