Shows Teleport Points in the scene, prompting user to teleport to such a point. When user teleports to a point, an according flow action can be taken. This is a great way to ask user to move to a certain part of the scene.
To create a Teleport Point in the scene:
- Add an empty Game Object on scene
- Add Teleport Point component to the object
This is how the Teleport Point look like in the Editor:
It has an orientation: in this picture it’s oriented to the right.
Note that Teleport Points are visible by default in Editor. However they are not visible when you enter your scene in Play mode.
The Teleport Points stay hidden until they are activated with this node. Here’s how it works.
- When this node is executed in Flow, all referenced Teleport Points show up in the scene.
- User can then point teleport ray to them.
- User can activate teleportation to a Teleport Point, and this will will move the user to the exact position of the Teleport Point.
- The node can also orient the user when teleported, more on that below.
- As soon as user teleports to a Teleport Point, all the Teleport Points mentioned in the current node become hidden again.
Note that this node is a Selection node, and that comes with a bunch of super-powers 🦸. Like enabling several Teleport Points in the scene at once, and then taking individual actions depending on where the user chooses to teleport. For example, we could make a target position that is correct, and the some others that are wrong.
On the basic level, just one Teleport Point will suffice.
Outputs:
- Out is executed instantly
- Selected is executed when user teleports to a Point
Parameters:
- Rotate Player: each teleport point has an orientation. Do you want to turn the user that direction when he teleports?
- Unique Flows For Each Object: create unique flow outputs for each teleport point, if there are several to choose from.
- Selectable Object: Teleport Point object in your scene to use.
This node is one the of Selection node family. Nodes in this family share the functionality.
Flow Configuration
When In is called, objects become selectable and the node begins to track the selections. Out is called instantly.
When all of the required objects are selected (configured by Selection Amount), All Or Max Tries is called. This will cause the node to stop automatically.
Any is called for each selection
If Unique Flows For Each Object is checked:
Any Not Connected: called for any object that does not have a unique output connected to anything
List of Unique Outs: generated for every option. If it isn’t the same as selectable options, click Refresh. These get called when their specific object was selected. Note: since every object can only be selected once, this will only be called once also
Last Selected: returns the last object that was selected. Useful for Any or Unique Options
Break: calling this will instantly stop the selection, will not call anything after that
Node Configuration
Selection Amount: defines how many objects should be selected:
- All Enabled: will wait until all of the enabled objects are selected. The node does not change the state of the scene in any way. That means that you will have to enable/disable objects beforehand. For example if you have 5 different objects and you disable 2 of them before calling this node, the user will need to click only on 3 objects that are left before All Or Max Tries is called.
- Limited: will limit the amount of “tries” to select the correct options to specified amount. For example if you have same 5 objects, disable 2 of them, and then limit the selection to 2, user will be able to select only 2 objects of the 3 available, before All Or Max Tries is called. This can be used not only for correct/incorrect scenarios, but also in “select 2 of this 5 items to add to the cart”
Selection Mode: changes the type and amount of objects that can be selected:
- Single Object: makes only 1 object available for selection. Object can be set directly or pulled from flow. Can’t specify Selection Amount or Unique Outs
- Static List: creates a list of selectable object inside of node. Can use Selection Amount and Unique Flows For Each Object parameter. However, the selectable list of selectable objects cannot be changed in runtime.
- Dynamic List: creates a value input for list of objects. Can use Selection Amount parameter. This is useful if you need to modify the list in runtime or you have several nodes that access the same list of options. However, since the list size and insides are unknown, it is impossible to use Unique Outs. You will have to make do with Any + Last Selected combo to look up what was actually selected
- Variable List: creates a list of value inputs for objects value input for list of objects. Needs Variables Count to specify amount of inputs. Can use Selection Amount and Unique Flows For Each Object parameter. Due to the nature of variables, it is impossible to get the name of the option ahead of the time, so unique outs will be instead called by their id
Usages
Prompt user to teleport to a certain point to prepare them for the next actions.
States
Busy when there are objects that can be selected.
Error if you start any other selection. Only one selection can be active at the same time.
Notes
An alternative to this node is Teleport Player, however the latter just moves player to the needed location instantly. Typically it’s a good idea to give users control, and therefore this node is preferred for better user experience.