Click or drag to resize

VisualMoveTo Method (Visual, Vector3, Double, Double, Double)

Move to a new location relative to another visual.

Namespace:  Demo3D.Visuals
Assembly:  Demo3D.Core (in Demo3D.Core.dll) Version: 15.0.2.11458
Syntax
C#
public void MoveTo(
	Visual targetVisual,
	Vector3 targetLocation,
	double speed,
	double acc,
	double dec
)

Parameters

targetVisual
Type: Demo3D.VisualsVisual
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.
targetLocation
Type: Microsoft.DirectXVector3
Location to move to relative to the targetVisual's coordinate space.
speed
Type: SystemDouble
Speed to move at.
acc
Type: SystemDouble
Acceleration to use.
dec
Type: SystemDouble
Deceleration to use
Examples
C#
// This example will move a visual to 1 meter above the visual target
// when it is clicked on, at a given speed, acceleration, and deceleration.
[Auto]
SimpleVisualPropertyValue<Visual> target3;
[Auto("OnClick")]
void MoveToVV3DDD_OnClick(Visual sender, PickInfo pickInfo)
{
    sender.MoveTo(target3.Visual, new Vector3(0, 1, 0), 2, 1, 1);
}
See Also