Introduction The IsSpriteInView method reports whether the argument Sprite is in view given the Camera’s position, the Sprite’s position, and the CameraCullMode. If the CameraCullMode is set to CameraCullMode.None then this value will always return true. If the CameraCullMode is set to CameraCullMode.UnrotatedDownZ then this will calculate whether the Sprite is in view or not.[…]


Introduction The RemoveLayer function removes the current Layer from the SpritManager. This function can be used to remove Layers once they are no longer needed (such as Layers created in custom code), or to move Layers between different Cameras. Code Example The following code shows how to create and destroy a Layer in custom code.[…]


Introduction The RenderTargetRenderer class can be used to greatly increase the performance of FlatRedBall games which present complex scenes which never or rarely change. For static scenes a RenderTargetRenderer allows for near infinite complexity – specifically it allows for a very large number of visual elements to be drawn with almost no slowdown. Also, the[…]


Introduction The Camera’s View property is a matrix which contains the “view” matrix commonly used when working with shaders. The View is internally calculated using the Matrix.CreateLookAt method. The View matrix is constructed using the Camera’s absolute Postiion, its RotationMatrix, and its UpVector. Code Example The View matrix can be used when interacting with shaders.[…]


Introduction The Layers property contains all of the Layers specific to this Camera. Cameras will have one Layer in the Layers property by default. This can be accessed in one of two ways: var defaultLayer = CameraInstance.Layers[0]; or var defaultLayer = CameraInstance.Layer; Notice that the first Layer in Layers is equivalent to the Layer property.[…]


FlatRedBall.Camera Introduction The Main property provides access to the main Camera in FlatRedBall. This value is always valid, and represents the default view. Therefore, it can be used to modify the view. Code Example To modify the X value of the Camera, you can use the Camera.Main property as follows: Camera.Main.X = 10;


Introduction Objects in Screens and Entities can be of type Camera. A Camera object will (by default) represent the main Camera (FlatRedBall.Camera.Main). If an object in an Entity is a Camera, then this will (by default) attach the main Camera to the Entity. If an object in a Screen is a Camera, then this object[…]


Introduction The UpdateViewProjectionMatrix updates the View and Projection properties according to the Camera’s current state. This function is automatically called on all Cameras which are a part of FlatRedBall every frame prior to the frame being rendered, but if the View and Projection properties are needed after the Camera has been updated, then UpdateViewProjectionMatrix needs[…]


Note: The preferred way to access the Camera is through Camera.Main. This page is left here for historical purposes, but may be removed at some point in the future. Use Camera.Main in future code. Introduction The static Camera property in the SpriteManager class represents the main FlatRedBall Camera. This Camera is created automatically when FlatRedBall[…]


Introduction Content managers provide functionality for organizing and caching game assets. They can be thought of as a “bucket of assets”. When you create an asset through the Content Manager, you give it a name (usually its file name) and decide which Content Manager it goes into. Later if the same name appears, the FlatRedBall[…]