Click or drag to resize

VisualMoveTo(Visual, Matrix, Double, Double, Double) Method

Move to a new matrix location relative to another visual. 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(
	Visual targetVisual,
	Matrix targetMatrix,
	double speed,
	double acc,
	double dec
)

Parameters

targetVisual  Visual
The MoveTo will be relative to this visual's initial position and coordinate space. If the visual to be moved is passed in here the movement will be relative to it's initial position. If null is passed in here the MoveTo will be relative to the scene.
targetMatrix  Matrix
Location to move to relative to the targetVisual's coordinate space in Matrix form.
speed  Double
Speed to move at.
acc  Double
Acceleration to use.
dec  Double
Deceleration to use.
Example
C#
// This example will move a visual to the target visual and rotate it 45 degrees
// about the Y axis, at a given speed, acceleration and deceleration.
[Auto] SimpleVisualPropertyValue<Visual> target7;
[Auto("OnClick")]
void MoveToVMDDD_OnClick(Visual sender, PickInfo pickInfo)
{
    sender.MoveTo(target7.Value, Matrix.RotationYDegrees(45), 2, 1, 1);
}
See Also