class CameraComponent

in global :: Sandbox

Every scene should have at least one Camera.


public void AddCommandList( CommandList buffer, Stage stage, int order = 0 )

Add a command list to the render

public void RemoveCommandList( CommandList buffer, Stage stage )

Remove an entry

public void RemoveCommandList( CommandList buffer )

Remove an entry

public void ClearCommandLists( Stage stage )

Remove all entries in this stage

public ClearFlags ClearFlags { get; set; }

The clear flags for this camera.

public Color BackgroundColor { get; set; }

The background color of this camera's view if there's no 2D Sky in the scene.

public bool IsMainCamera { get; set; }

Returns true if this is the main game camera.

public CameraComponent.Axis FovAxis { get; set; }

The axis to use for the field of view.

public float FieldOfView { get; set; }

The field of view of this camera.

public float ZNear { get; set; }

The camera's near clip plane distance. This is the closest distance this camera will be able to render. A good value for this is about 5. Below 5 and particularly below 1 you're going to start to see a lot of artifacts like z-fighting.

public float ZFar { get; set; }

The camera's far clip plane distance. This is the furthest distance this camera will be able to render. This value totally depends on the game you're making. Shorter the better, sensible ranges would be between about 1000 and 30000, but if you want it to be further out you can balance that out by making ZNear larger.

public int Priority { get; set; }

The priority of this camera. Dictates which camera gets rendered on top of another. Higher means it'll be rendered on top.

public bool Orthographic { get; set; }

Whether or not to use orthographic projection instead of perspective.

public float OrthographicHeight { get; set; }

The orthographic size for this camera while is set to true.

public StereoTargetEye TargetEye { get; set; }

🤡 Doc inheritance is not yet supported.

No summary.

public TagSet RenderTags { get; set; }

A list of tags that will be checked to include specific game objects when rendering this camera. If none are set, it will include everything.

public TagSet RenderExcludeTags { get; set; }

A list of tags that will be checked to exclude specific game objects when rendering this camera.

public Vector4 Viewport { get; set; }

The size of the camera represented on the screen. Normalized between 0 and 1.

public Texture RenderTarget { get; set; }

The texture to draw this camera to. Requires

public void UpdateSceneCamera( SceneCamera camera, bool includeTags = True )

Update a SceneCamera with the settings from this component

public Rect ScreenRect { get; }

The size of the viewport, in screen coordinates

public Vector3 ScreenToWorld( Vector2 screen )

🤡 Doc inheritance is not yet supported.

No summary.

public Frustum GetFrustum( Rect screenRect )

🤡 Doc inheritance is not yet supported.

No summary.

public Frustum GetFrustum( Rect screenRect, Vector3 screenSize )

🤡 Doc inheritance is not yet supported.

No summary.

public bool RenderToTexture( Texture target )

🤡 Doc inheritance is not yet supported.

No summary.

public Nullable<Matrix> CustomProjectionMatrix { get; set; }

Allows specifying a custom projection matrix for this camera

public Nullable<Vector2> CustomSize { get; set; }

Allows specifying a custom aspect ratio for this camera. By default the camera size is screen size or render target size.

public Matrix ProjectionMatrix { get; }

Get frustum projection matrix.

public Matrix CalculateObliqueMatrix( Plane clipPlane )

Calculates a projection matrix with an oblique clip-plane defined in world space.

public HudPainter Hud { get; }

Allows drawing on the camera. This is drawn before the post processing.

public HudPainter Overlay { get; }

Used to draw to the screen. This is drawn on top of everything, so is good for debug overlays etc.

public Rotation LocalRotation { get; set; }

😔 No documentation found.

public Transform LocalTransform { get; set; }

😔 No documentation found.

public ComponentFlags Flags { get; set; }

😔 No documentation found.

public Guid Id { get; }

😔 No documentation found.

public T GetComponentInParent( bool includeDisabled = False, bool includeSelf = True )

😔 No documentation found.

public IEnumerable<T> GetComponentsInParent( bool includeDisabled = False, bool includeSelf = True )

😔 No documentation found.

public T GetComponentInChildren( bool includeDisabled = False, bool includeSelf = True )

😔 No documentation found.

public IEnumerable<T> GetComponentsInChildren( bool includeDisabled = False, bool includeSelf = True )

😔 No documentation found.

public IEnumerable<T> GetComponents( bool includeDisabled = False )

😔 No documentation found.

public T GetComponent( bool includeDisabled = False )

😔 No documentation found.

public T GetOrAddComponent( bool startEnabled = True )

😔 No documentation found.

public Vector3 LocalPosition { get; set; }

😔 No documentation found.

public T AddComponent( bool startEnabled = True )

😔 No documentation found.

public void Invoke( float secondsDelay, Action action, CancellationToken ct = null )

😔 No documentation found.

public GameObject.NetworkAccessor Network { get; }

😔 No documentation found.

public bool IsProxy { get; }

😔 No documentation found.

public JsonNode Serialize( GameObject.SerializeOptions options = null )

😔 No documentation found.

public void Deserialize( JsonObject node )

😔 No documentation found.

public DebugOverlaySystem DebugOverlay { get; }

😔 No documentation found.

public int ComponentVersion { get; }

😔 No documentation found.

public Transform WorldTransform { get; set; }

😔 No documentation found.

public Vector3 WorldPosition { get; set; }

😔 No documentation found.

public Rotation WorldRotation { get; set; }

😔 No documentation found.

public Vector3 WorldScale { get; set; }

😔 No documentation found.

public Type GetType( )

😔 No documentation found.

public string ToString( )

😔 No documentation found.

public bool Equals( object obj )

😔 No documentation found.

public Vector3 LocalScale { get; set; }

😔 No documentation found.

public void DeserializeImmediately( JsonObject node )

😔 No documentation found.

public CameraComponent( )

😔 No documentation found.

public GameObject GameObject { get; }

😔 No documentation found.

public void ClearCommandLists( )

😔 No documentation found.

public void Reset( )

😔 No documentation found.

public IDisposable AddHookAfterOpaque( string debugName, int order, Action<SceneCamera> renderEffect )

😔 No documentation found.

public IDisposable AddHookAfterTransparent( string debugName, int order, Action<SceneCamera> renderEffect )

😔 No documentation found.

public IDisposable AddHookBeforeOverlay( string debugName, int order, Action<SceneCamera> renderEffect )

😔 No documentation found.

public IDisposable AddHookAfterUI( string debugName, int order, Action<SceneCamera> renderEffect )

😔 No documentation found.

public Vector2 PointToScreenNormal( ref Vector3 worldPosition )

😔 No documentation found.

public Vector2 PointToScreenPixels( ref Vector3 worldPosition )

😔 No documentation found.

public Vector2 PointToScreenPixels( Vector3 worldPosition, ref bool isBehind )

😔 No documentation found.

public Vector2 PointToScreenNormal( Vector3 worldPosition, ref bool isBehind )

😔 No documentation found.

public Ray ScreenPixelToRay( Vector3 pixelPosition )

😔 No documentation found.

public Ray ScreenNormalToRay( Vector3 normalPosition )

😔 No documentation found.

public Scene Scene { get; }

😔 No documentation found.

public GameTransform Transform { get; }

😔 No documentation found.

public int GetHashCode( )

😔 No documentation found.

public ComponentList Components { get; }

😔 No documentation found.

public bool Enabled { get; set; }

😔 No documentation found.

public bool Active { get; }

😔 No documentation found.

public bool IsValid { get; }

😔 No documentation found.

public Action OnComponentEnabled { get; set; }

😔 No documentation found.

public Action OnComponentStart { get; set; }

😔 No documentation found.

public Action OnComponentUpdate { get; set; }

😔 No documentation found.

public Action OnComponentFixedUpdate { get; set; }

😔 No documentation found.

public Action OnComponentDisabled { get; set; }

😔 No documentation found.

public Action OnComponentDestroy { get; set; }

😔 No documentation found.

public void Destroy( )

😔 No documentation found.

public void DestroyGameObject( )

😔 No documentation found.

public ITagSet Tags { get; }

😔 No documentation found.

public void EditLog( string name, object source )

😔 No documentation found.