Click or drag to resize

VisualMoveTo(Vector3, SpeedProfile) Method

Move to a new location given a speed profile. 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 void MoveTo(
	Vector3 worldLocation,
	SpeedProfile speedProfile
)

Parameters

worldLocation  Vector3
The location to move to.
speedProfile  SpeedProfile
The speed profile to use.
Example
C#
// This example will move a visual a meter up when it is clicked on,
// at a speed defined in a speed profile.
[Auto("OnClick")]
void MoveToV3Sp_OnClick(Visual sender, PickInfo pickInfo)
{
    var speed = new SpeedProfile(5, 2, 2);
    sender.MoveTo(sender.WorldLocation + new Vector3(0, 1, 0), speed);
}
See Also