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...
|
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...
|
|
|
| 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...
|
|
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 () |
|
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.
◆ TeleportTargetHandler()
TeleportTargetHandler.TeleportTargetHandler |
( |
| ) |
|
|
protected |
◆ 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
-
- Returns
Reimplemented in TeleportTargetHandlerNavMesh.
◆ ConsiderTeleport()
abstract bool TeleportTargetHandler.ConsiderTeleport |
( |
Vector3 |
start, |
|
|
ref Vector3 |
end |
|
) |
| |
|
protectedpure virtual |
◆ 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.
◆ AimCollisionLayerMask
LayerMask TeleportTargetHandler.AimCollisionLayerMask |
This bitmask controls which game object layers will be included in the targeting collision tests.
◆ AimData
The documentation for this class was generated from the following file: