The teleport system uses a prefab with an TeleportDestination component, which will track the target location and update a MechAnim to reflect if the destination is valid. Since the user can switch quickly between valid targets, it might be possible for a destination to remain active in the scene until a deactivation animation is completed. To support this behavior efficiently, these prefabs are managed by a simple object pool. Target handlers that don’t rely on discrete locations like Nodes are likely to have only one TeleportDestination prefab active at a time, however it is possible that multiple teleports can occur with any target handler type and if the TeleportDestination’s MechAnim has a Post Teleport animation it might be necessary to instantiate additional OVRTeleportDestinations to allow targeting to occur before the previous destination finishes it’s animation.
More...
The teleport system uses a prefab with an TeleportDestination component, which will track the target location and update a MechAnim to reflect if the destination is valid. Since the user can switch quickly between valid targets, it might be possible for a destination to remain active in the scene until a deactivation animation is completed. To support this behavior efficiently, these prefabs are managed by a simple object pool. Target handlers that don’t rely on discrete locations like Nodes are likely to have only one TeleportDestination prefab active at a time, however it is possible that multiple teleports can occur with any target handler type and if the TeleportDestination’s MechAnim has a Post Teleport animation it might be necessary to instantiate additional OVRTeleportDestinations to allow targeting to occur before the previous destination finishes it’s animation.
◆ OnDeactivated()
void TeleportDestination.OnDeactivated |
( |
| ) |
|
◆ OnDisable()
void TeleportDestination.OnDisable |
( |
| ) |
|
◆ OnEnable()
void TeleportDestination.OnEnable |
( |
| ) |
|
◆ Recycle()
void TeleportDestination.Recycle |
( |
| ) |
|
◆ UpdateTeleportDestination()
virtual void TeleportDestination.UpdateTeleportDestination |
( |
bool |
isValidDestination, |
|
|
Vector3? |
position, |
|
|
Quaternion? |
rotation, |
|
|
Quaternion? |
landingRotation |
|
) |
| |
|
virtual |
◆ LandingRotation
Quaternion TeleportDestination.LandingRotation |
◆ LocomotionTeleport
◆ OrientationIndicator
Transform TeleportDestination.OrientationIndicator |
◆ PositionIndicator
Transform TeleportDestination.PositionIndicator |
◆ TeleportState
◆ IsValidDestination
bool TeleportDestination.IsValidDestination |
|
get |
This can be used by MechAnim to change visuals accordingly.
◆ Deactivated
If anything is handling the Deactivated event, then the handlers will be responsible for recycling the object when it is finished.
The documentation for this class was generated from the following file: