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.
Note: In the SDK prior to version 1.3.1 the GameBoard scale was specified in an inversion of common expectation, where larger magnitude scales cause content to appear smaller. Starting in 1.3.1 SDK the
ScaleSettings
object has a boolean property calledlegacyInvertGameboardScale
to invert the scaling which defaults to true for compatibility. New content should set this to false and adjust scaling as needed, and when upgrading consider making these changes for your content. In SDK 1.4.X this legacy option will default to false and be considered obsolescent, and in some SDK version after 1.4 it will disappear completely.
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:
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.
The Gizmo Opacity field defines how opaque or transparent to make the gizmo.