Follow World Position: Follow the world position the flying text is displayed on.
If disabled, the flying text will only be placed at the position, but stay at it’s current screen position.
The UI itself can still be moved in any case (e.g. via schematics to animate it).Flying texts allow you to display UI content for a short time, matching the position of a game object on screen.
The most common example for a flying text is displaying damage numbers or earned points at an enemy’s position when defeating it.
Flying texts are displayed using Show Flying Text nodes in schematics. Showing a flying text will create an empty game object in the scene at the position the text is displayed at (i.e. the used game object’s position).
Flying Text Settings #
You can find the default settings for flying texts in UI > UI Settings in the Flying Text Settings.
Each individual flying text setup can optionally override the default settings for flying texts.
Depending on the used UI module, the setup for flying texts can be different.
E.g. the Unity UI module uses a prefab to create a flying text.
Create Object Type #
A flying text is displayed on screen for a position in the game world.
Generally, a flying text will always use a game object as the original object it’s placed on – i.e. the game object you use to display the flying text. However, the flying text can also create a new game object, which can be moved/changed independent from it’s original object.
Additionally, the Follow World Position setting defines if the flying text follows the world position of it’s game object, e.g. camera changes will cause the flying text to reposition on screen based on the actual position in the game world. If disabled, the flying text will only be placed at the position when creating it, but stay at it’s current screen position.
There are 3 types of creations available.
Doesn’t create a game object and only uses it’s original position (or follows the original game object if it’s mounted).
This will be best for performance, since it doesn’t involve creating and destroying an extra game object.
Creates an empty game object at the flying text’s original position.
The game object can be moved, rotated, etc. using the schematic animating the flying text – it’s available as the Machine Object of the schematic.
Creates an instance of a defined prefab.
This allows you to create more complex flying texts, e.g. by using a prefab that’ll be impacted by physics.
When using the Unity UI module, you can add a Canvas to the prefab – the flying text’s UI will be displayed on the prefab’s canvas in this case. You can use this to create world space flying texts instead of screen space.
A flying text’s on-screen visibility can optionally be checked via it’s viewport position of the camera.
I.e. if the flying text is not visible in the camera’s viewport, it’ll be hidden and not updated – this can improve performance.
Checking visibility is enabled by default.
Limit Display Range #
Optionally limit the range at which new flying texts are created.
The range can be either to the player’s game object or the main camera.
Flying texts are placed based on a position of a game object, you can use positions to add random offsets to the game object’s position, mount the flying text to it (i.e. it’ll keep following the original game object), target a child object, etc.
You can add multiple positions, either using one randomly or using them in order. When using in order, you can automatically reset them after a defined time.
E.g. using positions in order allows keeping flying texts out of each other’s way when they’re shown in quick succession.
Animation using Schematics #
Flying texts can use schematics to animate them – the UI of the flying text is available as local selected data via the selected key ui.
In case the flying text creates a game object in the scene to position itself, the game object is available as Machine Object and the original object it’s based/placed on as Starting Object.
You can change the flying text’s color using a Change UI Color node (using the selcted data ui), e.g. fading in/out the alpha value.
You can change the flying text’s position using a Change UI Offset node (using the selcted data ui), the offset is from it’s game object’s on-screen position.
You can change the flying text’s scale using a Change UI Scale node (using the selcted data ui).
Tip: When Using Multiple Cameras #
Flying texts are displayed on-screen based on where the camera sees the game object or world position they are placed at.
If you switch between different cameras, the main camera that was used when the level was loaded is still being used for positioning flying texts.
To switch the used camera, add an Is Makinom Camera component to each of the cameras. This component will set the game object’s camera as the main camera used by Makinom when the game object is enabled. Please note that this will only work if you enable/disable the cameras as needed.
You can find tutorials for flying texts in the ORK Framework tutorials. ORK is an extension for Makinom 2.
Unity UI Setup #
For an example setup for flying texts using the Unity UI module, see this ORK tutorial.
Animation Schematic #
For an example setup for schematics animating a flying text, see this ORK tutorial.