TeleportDestination Class Reference

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...

Inheritance diagram for TeleportDestination:

Public Member Functions

void OnEnable ()
 
void OnDisable ()
 
void OnDeactivated ()
 
void Recycle ()
 
virtual void UpdateTeleportDestination (bool isValidDestination, Vector3? position, Quaternion? rotation, Quaternion? landingRotation)
 

Public Attributes

Transform PositionIndicator
 
Transform OrientationIndicator
 
Quaternion LandingRotation
 
LocomotionTeleport LocomotionTeleport
 This will be set by the LocomotionTeleport when the object is instantiated. More...
 
LocomotionTeleport.States TeleportState
 The LocomotionTeleport will update this only while this destination is active. More...
 

Properties

bool IsValidDestination [get]
 This can be used by MechAnim to change visuals accordingly. More...
 

Events

Action< TeleportDestinationDeactivated
 If anything is handling the Deactivated event, then the handlers will be responsible for recycling the object when it is finished. More...
 

Detailed Description

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.

Member Function Documentation

◆ 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

Member Data Documentation

◆ LandingRotation

Quaternion TeleportDestination.LandingRotation

◆ LocomotionTeleport

LocomotionTeleport TeleportDestination.LocomotionTeleport

This will be set by the LocomotionTeleport when the object is instantiated.

◆ OrientationIndicator

Transform TeleportDestination.OrientationIndicator

◆ PositionIndicator

Transform TeleportDestination.PositionIndicator

◆ TeleportState

LocomotionTeleport.States TeleportDestination.TeleportState

The LocomotionTeleport will update this only while this destination is active.

Property Documentation

◆ IsValidDestination

bool TeleportDestination.IsValidDestination
get

This can be used by MechAnim to change visuals accordingly.

Event Documentation

◆ Deactivated

Action<TeleportDestination> TeleportDestination.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: