The TeleportTargetHandler's main purpose is to determine when the current aim target is valid and to update the teleport destination as required by the design. This allows specialized versions that can simply update the destination to any arbitrary location, or update only when a teleport node is being pointed at, or anything else that fits the design for limiting when & where a teleport is valid. More...

Inheritance diagram for TeleportTargetHandler:
TeleportSupport TeleportTargetHandlerNavMesh TeleportTargetHandlerNode TeleportTargetHandlerPhysical

Public Member Functions

virtual Vector3 ConsiderDestination (Vector3 location)
 Adjust the provided located to account for character height and perform any checks that might invalidate the target position of the character controller, such as collision with scene geometry or other actors. More...
 

Public Attributes

LayerMask AimCollisionLayerMask
 This bitmask controls which game object layers will be included in the targeting collision tests. More...
 

Protected Member Functions

 TeleportTargetHandler ()
 
override void AddEventHandlers ()
 Derived classes that need to use event handlers need to override this method and call the base class to ensure all event handlers are added as intended. More...
 
override void RemoveEventHandlers ()
 Derived classes that need to use event handlers need to override this method and call the base class to ensure all event handlers are removed as intended. More...
 
virtual void ResetAimData ()
 
abstract bool ConsiderTeleport (Vector3 start, ref Vector3 end)
 This method will be called while the LocmotionTeleport component is in the aiming state, once for each line segment that the targeting beam requires. The function should return true whenever an actual target location has been selected. More...
 
- Protected Member Functions inherited from TeleportSupport
virtual void OnEnable ()
 OnEnable is virtual so that derived classes can set up references to objects before AddEventHandlers is called, as is required by TeleportSupport derivations. More...
 
virtual void OnDisable ()
 

Protected Attributes

readonly LocomotionTeleport.AimData AimData = new LocomotionTeleport.AimData()
 

Additional Inherited Members

- Properties inherited from TeleportSupport
LocomotionTeleport LocomotionTeleport [get]
 

Detailed Description

The TeleportTargetHandler's main purpose is to determine when the current aim target is valid and to update the teleport destination as required by the design. This allows specialized versions that can simply update the destination to any arbitrary location, or update only when a teleport node is being pointed at, or anything else that fits the design for limiting when & where a teleport is valid.

Constructor & Destructor Documentation

◆ TeleportTargetHandler()

TeleportTargetHandler.TeleportTargetHandler ( )
protected

Member Function Documentation

◆ AddEventHandlers()

override void TeleportTargetHandler.AddEventHandlers ( )
protectedvirtual

Derived classes that need to use event handlers need to override this method and call the base class to ensure all event handlers are added as intended.

Reimplemented from TeleportSupport.

◆ ConsiderDestination()

virtual Vector3 TeleportTargetHandler.ConsiderDestination ( Vector3  location)
virtual

Adjust the provided located to account for character height and perform any checks that might invalidate the target position of the character controller, such as collision with scene geometry or other actors.

Parameters
location
Returns

Reimplemented in TeleportTargetHandlerNavMesh.

◆ ConsiderTeleport()

abstract bool TeleportTargetHandler.ConsiderTeleport ( Vector3  start,
ref Vector3  end 
)
protectedpure virtual

This method will be called while the LocmotionTeleport component is in the aiming state, once for each line segment that the targeting beam requires. The function should return true whenever an actual target location has been selected.

Parameters
start
end

Implemented in TeleportTargetHandlerNavMesh, TeleportTargetHandlerNode, and TeleportTargetHandlerPhysical.

◆ RemoveEventHandlers()

override void TeleportTargetHandler.RemoveEventHandlers ( )
protectedvirtual

Derived classes that need to use event handlers need to override this method and call the base class to ensure all event handlers are removed as intended.

Reimplemented from TeleportSupport.

◆ ResetAimData()

virtual void TeleportTargetHandler.ResetAimData ( )
protectedvirtual

When a parabolic or other aiming method that consists of many line segments is being used, ConsiderTeleport will be called once for each segment so if there is expensive work that can be cached in advance, override the ResetAimData method to prepare that data.

Member Data Documentation

◆ AimCollisionLayerMask

LayerMask TeleportTargetHandler.AimCollisionLayerMask

This bitmask controls which game object layers will be included in the targeting collision tests.

◆ AimData

readonly LocomotionTeleport.AimData TeleportTargetHandler.AimData = new LocomotionTeleport.AimData()
protected

The documentation for this class was generated from the following file: