Click or drag to resize
Ab4d.SharpEngine logo

FreeCameraRotationUpAxis Property

Gets or sets a nullable Vector3 that can specify a custom rotation up axis that is used to when camera is rotated "horizontally" (e.g when user drags the mouse horizontally). When RotationUpAxis is not set (is null) then camera rotates around the current camera's UpDirection. This provides the standard free camera experience and is the default setting.

Namespace: Ab4d.SharpEngine.Cameras
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 1.0.8740+deb2991acfe86a95cca780cd4f82bcae2805c1a5
Syntax
C#
public Vector3? RotationUpAxis { get; set; }

Property Value

NullableVector3

Implements

IFreeCameraRotationUpAxis
Remarks

RotationUpAxis gets or sets a nullable Vector3 that can specify a custom rotation up axis that is used to when camera is rotated "horizontally" (e.g when user drags the mouse horizontally).

When RotationUpAxis is not set (is null) then camera rotates around the current camera's UpDirection. This provides the standard free camera experience and is the default setting.

Setting RotationUpAxis to Y up vector (0, 1, 0) makes the FreeCamera to behave similar to the TargetPositionCamera and other cameras when rotating. What is more, it is possible to set the RotationUpAxis to Z axis (0, 0, 1) to have similar behavior then TargetPositionCamera but with Z axis as Up axis (like in many CAD applications).

See Also