Click or drag to resize

VisualTurnTo Method (Vector3, Double)

Turn to a new yaw pitch roll in a fixed time.

Namespace:  Demo3D.Visuals
Assembly:  Demo3D.Core (in Demo3D.Core.dll) Version: 15.0.2.11458
Syntax
C#
public double TurnTo(
	Vector3 worldAnglesRadians,
	double duration
)

Parameters

worldAnglesRadians
Type: Microsoft.DirectXVector3
The rotation to turn to, relative to the world, in radians.
duration
Type: SystemDouble
The time taken to turn.

Return Value

Type: Double
The duration of the turn.
Examples
C#
// This example will rotate a visual 1 radian around its Y axis when clicked,
// taking 3 seconds to do so.
[Auto("OnClick")]
void TurnToVD_OnClick(Visual sender, PickInfo pickInfo)
{
    sender.TurnTo(sender.WorldRotationRadians + new Vector3(0, 1, 0), 3);
}
See Also