Drive handles character entry, seating, and exit around a vehicle controller. Use a supported integration or custom IDriveSource for vehicle physics, input, and movement.
Set up the character
- Add Drive under Ultimate Character Locomotion > Abilities. Defaults are Start Type Button Down, Stop Type Button Toggle, and Input Names Action.
- For animated approach, add Move Towards above Drive, with optional pathfinding above it.
- Configure object detection, Detect Layers, and optional Object ID. A door-side trigger is a simple proximity route.
- Under General > Allow Equipped Items, clear slots that must stow. Provide Item Equip Verifier and working Equip Unequip categories for those transitions.
- Choose entry style, aiming, and visibility below. Supply Drive Animator states and entry/exit events for animated transitions.
Drive uses Action input with ButtonDown start and ButtonToggle stop. Teleport Enter Exit is enabled and Can Aim is disabled in this Trigger-based configuration.

Set up the vehicle
- Add the integration’s Drive Source, or implement the interface below. It must be on the detected collider object or a parent.
- Assign a seated Transform to Driver Location, matching the rider root’s position and rotation.
- Put one or more Move Towards Location components below the GameObject returned by the source. Position and face them beside valid doors/exit areas.
- For optional Box, Capsule, or Sphere exit-clearance colliders, enable Is Trigger and size the volume for the character. Keep solid vehicle/scenery outside that space.
- Return the vehicle colliders that should ignore the character while seated. Choose vehicle Rigidbody interpolation deliberately; Drive matches character interpolation after entry and restores it afterward.
A valid location is required even for teleport entry/exit. Detection uses Detect Layers; exit clearance independently uses IgnoreInvisibleCharacterWaterLayers and ignores triggers. Include blocking scenery in the clearance mask.
Choose transition and presentation
| Setting or stage | Configuration |
|---|---|
| Teleport Enter Exit disabled | Move Towards approaches the entry location, animation reaches the seat, and OnAnimatorEnteredVehicle completes entry. Exit waits for OnAnimatorExitedVehicle. |
| Teleport Enter Exit enabled | Skips approach/animation waits, seats at Driver Location, and exits to a valid location. |
| Exit selection | Every request requires clearance; the first clear returned location is used. |
| Can Aim | Also allow the relevant equipped slot. With no allowed slots, Drive blocks all item abilities, including Aim. |
| Disable Mesh Renderers | Hides child Skinned Mesh Renderers after entry and restores them as exit begins; use for an invisible cockpit driver. |
| Reequip Slots | Controls verifier restoration after Drive ends. |
| Move Speed | Tune approach through Move Towards/location settings and the entry clip; seated following uses Driver Location. |
Give each vehicle animation family a distinct source Animator ID, conventionally spaced by 10. AbilityIntData is that ID plus 0 for Enter, 1 for Drive, or 2 for Exit. ID 70 therefore selects 70, 71, and 72. AbilityFloatData supplies raw horizontal input for steering animation.
Own the handoff
Starting Drive parents the character to the vehicle, establishes its moving-platform relationship, and calls source entry handling. At the entered point, Drive ignores supplied colliders, disables character root motion, follows Driver Location, and calls the source’s entered callback. The source must enable and control the vehicle.
Toggle input requests exit only after seating and with a clear location. The source receives exit handling; the animation callback or teleport path completes it. Drive restores collisions, interpolation, original parent, gravity alignment, and the normal platform relationship.
Verify entry and blocked exit
Approach and confirm Detected Object. Press Action: animated setup should align through Move Towards, enter the correct vehicle-specific branch, and settle at Driver Location. The controller should receive input and the character should stay aligned without vehicle collisions.
Test steering animation, allowed items/Aim, visibility, and interpolation. Exit through a clear point and confirm normal character movement returns. Block one exit, then all exits, and confirm the ability uses an available point or remains seated. Test the same requirements with teleport mode.
| Symptom | Check | Fix |
|---|---|---|
| Detection/start fails | Source hierarchy, layer, valid location | Match the detector and provide a clear source-child location. |
| Location rejected in empty space | Clearance collider configuration | Make the optional clearance shape a trigger. |
| Entry/exit never completes | Exact Animator callbacks | Add them to every reachable clip or choose teleport mode. |
| Vehicle remains still | Source/controller ownership | Complete the integration’s entered/exit handling. |
| Aim blocked or driver visible | Allowed slots and renderer option | Configure both item permission and intended presentation. |
Developer reference
IDriveSource supplies GameObject, Transform, DriverLocation, Colliders, and AnimatorID, plus EnterVehicle(Drive), EnteredVehicle(Drive), ExitVehicle(Drive), and ExitedVehicle(Drive).
Use these boundaries for vehicle input, camera, audio, lights, and door ownership. The demo SkyCar enables control in EnteredVehicle and disables it in ExitVehicle. Drive exposes TeleportEnterExit, CanAim, and MoveSpeed; renderer hiding is protected serialized configuration. See vehicle integrations and Animation Event Trigger.