Class OrientationGizmoExtensions
Adds the OrientationGizmoRenderer to a game.
public static class OrientationGizmoExtensions
- Inheritance
-
OrientationGizmoExtensions
Methods
AddOrientationGizmo(IGame, ScreenAnchor)
Draws the world axes in a corner of the screen, turning with the camera, so the scene's orientation can be read at a glance wherever the camera is.
public static OrientationGizmoRenderer AddOrientationGizmo(this IGame game, ScreenAnchor anchor = ScreenAnchor.BottomLeft)
Parameters
gameIGameThe game.
anchorScreenAnchorThe corner or edge the gizmo sits in. The default is the bottom left.
Returns
- OrientationGizmoRenderer
The renderer, for its size, colours and opacity.
Remarks
Unlike AddGroundGizmo, which marks the world's origin in the scene, this is screen-space
and ignores depth, the way an editor viewport's axis widget does. Calling it again returns the
renderer already in the compositor and moves it to anchor.
Exceptions
- InvalidOperationException
The GraphicsCompositor is not set in the game's SceneSystem.