Click or drag to resize

VisualMoveTo(Vector3, Double, Double, Double) Method

Move to a new location given a speed, acceleration, and deceleration. An acceleration or deceleration of zero is handled as infinity, meaning the top speed is instantly reached, and movement is immediately stopped respectively.

Namespace: Demo3D.Visuals
Assembly: Demo3D.Core (in Demo3D.Core.dll) Version: 19.01.00
Syntax
C#
public double MoveTo(
	Vector3 worldLocation,
	double speed,
	double acc,
	double dec
)

Parameters

worldLocation  Vector3
The location to move to.
speed  Double
The speed to move at.
acc  Double
Acceleration to use.
dec  Double
Deceleration to use.

Return Value

Double
Time taken to move.
Example
C#
// This example will move a visual a meter up when it is clicked on,
// at a given speed, acceleration, and deceleration.
[Auto("OnClick")]
void MoveToV3DDD_OnClick(Visual sender, PickInfo pickInfo)
{
    sender.MoveTo(sender.WorldLocation + new Vector3(0, 1, 0), 2, 1, 1);
}
See Also