Click or drag to resize
Ab4d.SharpEngine logo

TargetPositionCameraMoveTargetPositionTo Method

Animates the TargetPosition to the finalTargetPosition. The animation takes animationDurationInMilliseconds and uses the specified easingFunction.

Namespace: Ab4d.SharpEngine.Cameras
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
public void MoveTargetPositionTo(
	Vector3 finalTargetPosition,
	int animationDurationInMilliseconds,
	Func<float, float>? easingFunction = null
)

Parameters

finalTargetPosition  Vector3
Camera's TargetPosition value after the animation is complete
animationDurationInMilliseconds  Int32
duration of animation in milliseconds
easingFunction  FuncSingle, Single  (Optional)
easing function (see Ab4d.SharpEngine.Common.EasingFunctions for different easing functions). When null linear interpolation is used.
Remarks

MoveTargetPositionTo animates the TargetPosition to the finalTargetPosition. The animation takes animationDurationInMilliseconds and uses the specified easingFunction.

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

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

See Also