Next: Thruster, Previous: Stick To Ground, Up: Motion [Contents][Index]
Teleporter allows players and objects to instantaneously travel from one place to another.
To teleport this object, supply a list of ’Tele Target Tags’ that this object can teleport to, or supply a ’Tele Target’ to make it go to one specific object, then call the appropriate message. To teleport another object instead, simply attach a collider to this object marked ’Is Trigger’ (found on the Collider component) and a list of both ’Tele Target Tags’ and ’Teleportable Tags’, the latter representing objects that can be moved using this teleportation trigger.
List<string>
teleTargetTagsA list of tags we can teleport to using the message ’TeleportToSelected’ which takes an integer representing the index of the tag you wish to use from the list and will teleport this object to an object with that tag.
Default value: new List<string>()
bool
automaticIf true, we will try to teleport any object that enters our trigger and has a matching tag
Default value: true
GameObject
splashPrefabIf supplied, we will spawn this at the entrance and exit position when teleporting. Does not use object pooling, so a new one is created each time this is used.
MessageManager.ManagedMessage
teleportMessageMessage sent when we activate the teleporter successfully
MessageManager.ManagedMessage
failureMessageMessage sent when we fail to teleport
Teleports this object to the supplied ’Tele Target’ scene object, if any.
Teleports this object to the nearest object of a given tag.
Argument: Tag of the object we can teleport to.
Teleports this object to an object with a tag in the list of ’Tele Target Tags’
List<string>
teleTargetTagsA list of tags we can teleport to using the message ’TeleportToSelected’ which takes an integer representing the index of the tag you wish to use from the list and will teleport this object to an object with that tag.
Default value: new List<string>()
bool
automaticIf true, we will try to teleport any object that enters our trigger and has a matching tag
Default value: true
GameObject
splashPrefabIf supplied, we will spawn this at the entrance and exit position when teleporting. Does not use object pooling, so a new one is created each time this is used.
MessageManager.ManagedMessage
teleportMessageMessage sent when we activate the teleporter successfully
MessageManager.ManagedMessage
failureMessageMessage sent when we fail to teleport
Teleports this object to the supplied ’Tele Target’ scene object, if any.
Teleports this object to the nearest object of a given tag.
Argument: Tag of the object we can teleport to.
Teleports this object to an object with a tag in the list of ’Tele Target Tags’
Next: Thruster, Previous: Stick To Ground, Up: Motion [Contents][Index]