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.VisualsAssembly: Demo3D.Core (in Demo3D.Core.dll) Version: 19.01.00
Syntaxpublic void MoveTo(
Vector3 worldLocation,
SpeedProfile speedProfile
)
Parameters
- worldLocation Vector3
- The location to move to.
- speedProfile SpeedProfile
- The speed profile to use.
Example
[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