ABILITY 07
Teleport
Press once to aim toward the mouse, then press again to teleport within the configured distance.
Activation
TeleportButtonExample use
A short directional teleport during a platforming sequence.
Ability documentationCHARACTER ABILITY
SETUP GUIDE
Set up this ability
Component dependencies
| Component | Where to add or assign it | Purpose / setup |
|---|---|---|
| Camera tagged MainCamera | Scene | Required for updating the mouse-aimed destination. |
Visual component dependencies
These components support the associated effect. A missing optional visual does not by itself imply that the gameplay mechanic cannot run.
| Component | Where to add or assign it | Purpose / setup |
|---|---|---|
| ReticlePrefab | Assigned prefab field | Optional destination marker. The included reticle uses TeleportReticle; a custom marker can provide its own visuals. |
- Add CharacterTeleport to a CharacterPlus character using CustomInputManager.
- Assign the optional RecticlePrefab 1 to ReticlePrefab, and set TeleportDistance (default 4 world units).
- Use a camera tagged MainCamera. Mouse aiming uses the legacy input path.
- Create TeleportAim and TeleportFire bools in the character Animator.
- Press TeleportButton once to aim, move the mouse, then press it again to confirm. The aim point is clamped to TeleportDistance.
Inspector reference
These are C# field declaration defaults. Existing prefab and scene values can override them. Shared fields are documented under Ability Configuration.
| Field | Type | Declared default |
|---|---|---|
TeleportDistance | float | 4f |
ReticlePrefab | GameObject | Not assigned in declaration |
Usage notes
- Confirmation uses CorgiController.TrySetSafeTransformPosition to resolve the destination against level collisions.
- Teleport has custom two-press handling. It does not follow the generic ActivationDelay and toggle-off workflow.
- Match your animation clip naming to the TeleportAim parameter used by the animation-duration helper.
