Click or drag to resize
AB4D logo

FreeCameraRotateTo(Point3D, Point3D, Vector3D, Int32, FuncDouble, Double, FreeCameraAnimationNodeFreeCameraAnimationTypes) Method

Animates the CameraPosition, TargetPosition and UpDirection to the targetCameraPosition, targetTargetPosition and targetUpDirection. The animation takes animationDurationInMilliseconds and uses easingFunction. By default (when animationType is SphericalInterpolation), the animation uses spherical interpolation instead of linear interpolation to come from the current to the target position.

Namespace: Ab3d.Cameras
Assembly: Ab3d.PowerToys (in Ab3d.PowerToys.dll) Version: 11.2.9104.2045
Syntax
C#
public virtual void RotateTo(
	Point3D targetCameraPosition,
	Point3D targetTargetPosition,
	Vector3D targetUpDirection,
	int animationDurationInMilliseconds = 0,
	Func<double, double> easingFunction = null,
	FreeCameraAnimationNodeFreeCameraAnimationTypes animationType = FreeCameraAnimationNodeFreeCameraAnimationTypes.SphericalInterpolation
)

Parameters

targetCameraPosition  Point3D
Camera's position after the animation is completed
targetTargetPosition  Point3D
Camera's TargetPosition after the animation is completed
targetUpDirection  Vector3D
Camera's UpDirection after the animation is completed
animationDurationInMilliseconds  Int32  (Optional)
duration of animation in milliseconds
easingFunction  FuncDouble, Double  (Optional)
easing function (see Ab3d.Animation.EasingFunctions for different easing functions). When null linear interpolation is used.
animationType  FreeCameraAnimationNodeFreeCameraAnimationTypes  (Optional)
type of animation interpolation (when not specified, then SphericalInterpolation is used).
Remarks

RotateTo method animates the CameraPosition, TargetPosition and UpDirection to the targetCameraPosition, targetTargetPosition and targetUpDirection. The animation takes animationDurationInMilliseconds and uses easingFunction.

This methods stops any existing animation or rotation that is currently running (except those that are running on AnimationController defined by the user; not in this camera).

easingFunction parameter can be set to any Func that takes a double value and returns another double values (both in range from 0 to 1). It is possible to use a predefined list of easing functions that are defined in Ab3d.Animation.EasingFunctions). When easingFunction parameter is null then linear interpolation is used.

By default (when animationType is SphericalInterpolation), the animation uses spherical interpolation instead of linear interpolation to come from the current to the target position.

See Also