Game Board

The GameBoard component uses the Transform of its GameObject to define the position, orientation, and scale of the game board. If the player’s perspective is meant to move throughout a scene, this should be accomplished by moving the GameBoard GameObject.

GameBoard inherits from a utility class called UniformScaleTransform, which locks the GameObject’s Transform’s scale axes to each other.

Note that both the TiltFiveManager’s Content Scale and the GameBoard’s scale both affect the player’s perception of scale. Content Scale is intended to be set during initialization or other transitions, whereas GameBoard’s scale is intended to be used for cinematic animation, such as zooms.

When porting or implementing cinematics for Tilt Five, it is important to be aware of Unity’s script execution order. In a typical Unity project, objects in the scene are moved during Update() in a nondeterministic order, and if the order is important, developers can specify the script execution order in their project settings. If the developer implements a follow camera, it is recommended to use LateUpdate() to guarantee that the camera is moved after all objects in the scene are finished moving. This prevents inconsistencies between the tracked object and the follow camera, which may manifest as lag or jittering. The Tilt Five eye cameras do something similar with the Game Board, basing their position on the Game Board’s position, meaning that the camera updates occur in LateUpdate() and the board is moved in Update(). This may cause problems for developers intending to implement a “follow Game Board” that follows a tracked object. Specifically, nondeterministic updates to the Game Board position can cause the same lag/jittering described above. This can be avoided by setting the Game Board follow script’s execution order to be greater than other scripts, so that the Game Board moves after all objects are finished moving. This can be done in Edit > Project Settings > Script Execution order, or by attaching the [DefaultExecutionOrder(…)] attribute to the follow script’s class. Here is an example:

/// <summary>
/// Class to make the Game Board follow an object in the scene.
/// </summary>
public class GameBoardFollow : MonoBehaviour
        // The Game Board Transform.
        public Transform gameBoardTransform;
        // The object to be followed.
        public Transform followObject;

        // This Update() call occurs after the Update() calls of nearly all other scripts,
        // unless they have a script execution order higher than 100. This is desirable
        // because we want all objects in the scene to have a chance to move before we track
        // their movements with the Game Board — we want the Game Board to move as late as
        // possible before LateUpdate() gets called to position the eye cameras.
        private void Update()
            gameBoardTransform.position = followObject.position;

Show Gizmo

GameBoard also provides a handy gizmo to help visualize the GameBoard relative to the content in the scene.

Show Gizmo enables/disables visibility of the Game Board gizmo. The gizmo is only visible in the Unity editor’s Scene view.

Gizmo Opacity

The Gizmo Opacity field defines how opaque or transparent to make the gizmo.