Introduction FlatRedBall Editor provides a Camera window which can be used to set the game’s resolution and various Camera settings. This can be accessed through the camera icon in the toolbar. Keep in mind that when the game runs embedded in the FlatRedBall Editor, the Editor window may modify the resolution settings. Resolution By default[…]


Introduction The CameraControllingEntity provides a standardized way to control camera position in games which contain a moving character or which use Tiled for maps. Default Implementation If your game was created with the wizard, then your GameScreen has an instance called CameraControllingEntityInstance. This instance targets the PlayerList (averages the position of all Players in the[…]

02 – Adding Camera Code

Introduction The previous tutorial created a Screen which holds our world map Sprite. This tutorial will be all code. We’ll be modifying the Camera to make it look like we are “falling” into the world map. Changing the Camera to 3D As mentioned before, we will be changing the Camera to 3D in code. The[…]


Introduction The RenderingLibrary.Camera object provides control over the viewable area when rendering Gum objects (and any other non-Gum object added directly to the rendering library). In many cases FlatRedBall games do not interact with this object. If the RenderingLibrary.Camera is not modified, then the top-left corner is (0,0) and all objects render at 1:1 scale.[…]

Glue:How To:Create a 3D Camera

Introduction FlatRedBall supports 3D cameras. Default Glue projects are 2D but can easily be converted to 3D. Changing the Camera in Glue If your entire project is a 3D game, you can set the Camera to 3D in the Camera Settings window. For more information see this page.


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[…]

Glue:How To:Create a First Person Camera

Introduction This tutorial will show you how to make an Entity which controls the Camera in first person mode. The general steps we’ll follow are: Create a FlatRedBall Steps Create a large repeating Sprite which we’ll use for the ground Create an Entity which will control the Camera (called CameraController) Set the initial position of our[…]


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 The OrthogonalWidth and OrthogonalHeight of a LayerCameraSettings object controls the number of units wide and high that the Layer will display. The LayerCameraSettings’ Orthogonal value must be true for the OrthogonalWidth and OrthogonalHeight properties to apply. Orthogonal Examples This example was initially constructed in Glue. To reproduce this: Create a Screen Add a Sprite[…]

Following a character with the Camera

Introduction Top-down games which are played in an area larger than the size of the screen usually require a scrolling Camera. This problem can be solved a number of different ways. This article discusses the approaches and why each may be used. Attaching the Camera to the Character If the Character is a PositionedObject (which[…]