Click or drag to resize

VisualMoveTo(Matrix, SpeedProfile) Method

Move to a new matrix location using 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.00.00
Syntax
C#
public void MoveTo(
	Matrix targetMatrix,
	SpeedProfile speed
)

Parameters

targetMatrix  Matrix
Target location in Matrix form.
speed  SpeedProfile
Speed profile to use.
Example
C#
// This example will move a visual to the origin and rotate it 45 degrees
// about the Y axis, at a speed set with a speed profile.
[Auto("OnClick")]
void MoveToMSp_OnClick(Visual sender, PickInfo pickInfo)
{
    var speed = new SpeedProfile(5, 2, 2);
    sender.MoveTo(Matrix.RotationYDegrees(45), speed);
}
See Also