Mouse |
RotationInertiaRatio gets or sets a double that specifies how strong the camera rotation inertial is. When set to 0, camera does not have any inertia. Default value is 1. Values bigger than 1 increase the time it takes to stop the camera.
The RotationInertiaRatio value is used in the following way:
Number 1000 is divided by RotationInertiaRatio to get the deceleration speed - number of degrees the velocity will change per one second (if no easing function would be used).
This number is than used to call the camera's StopRotation(Double, BaseCameraEasingFunctionDelegate) method.
The actual deceleration of rotation speed is also determined by the easing function. By default a simple cubic easing function is used (y = (x - 1) * (x - 1) * (x - 1) + 1). The function can be changed (or set to null) by changing the RotationEasingFunction delegate.
For example the MouseCameraController is using the following cubic function to ease the camera rotation inertia:
public static double CubicEaseOut(double x) { return (x - 1) * (x - 1) * (x - 1) + 1; }