Click or drag to resize

VisualTurnTo(Vector3, Double) Method

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

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

Parameters

worldAnglesRadians  Vector3
The rotation to turn to, relative to the world, in radians.
duration  Double
The time taken to turn.

Return Value

Double
The duration of the turn.
Example
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