Click or drag to resize
Ab4d.SharpEngine logo

IFreeCameraRotationUpAxis 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: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
Vector3? RotationUpAxis { get; set; }

Property Value

NullableVector3
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