On this page
Integrations

Enter and exit vehicles

Goal: walk up to a car, enter it, drive, then get back out.

Before you start

Complete Your First Drive. This feature uses the optional BCG Shared Assets addon included with RCCP.

The addon supplies basic first-person and third-person controllers, cameras, touch controls and the handoff between character and vehicle. It is a starting point for vehicle interaction; character art, animation and inventory are separate work.

1. Import and try the example

  1. Open Tools > BoneCracker Games > Realistic Car Controller Pro > Welcome Window.
  2. Select Addons > BCG Shared Assets > Import.
  3. Wait for Unity to finish importing and compiling.
  4. On Demos, find Enter / Exit Scenes and open Blank FPS.
  5. Save your previous scene if prompted, then press Play.
  6. Use W/A/S/D to walk and the mouse to look. Face the car at close range.
  7. When the interaction prompt appears, press Tab.
  8. Drive, stop the car, wait a moment, then press Tab again.

Check: the camera changes when you enter, the car responds to driving input, and your character reappears beside it when you exit.

Blank TPS demonstrates third-person control. City FPS and City TPS also need Demo Content.

2. Add the scene manager

For your own scene, stop Play Mode first. Use a car that already drives and a scene with an RCCP camera and scene manager; see Scenes and Spawning.

Open Tools > BoneCracker Games > Shared Assets > Enter-Exit > Add Main Enter-Exit Manager To Scene.

Check: the Hierarchy contains one _BCGEnterExitManager. One manager handles all enterable cars in the scene.

3. Make the car enterable

  1. Select the vehicle's root in the Hierarchy: the object with RCCP_CarController.
  2. Use Tools > BoneCracker Games > Shared Assets > Enter-Exit > Add Enter-Exit To Vehicle.
  3. Expand the car in the Hierarchy and select its new Get Out Pos child.
  4. Move that child to a clear place beside a door, above the ground and outside the bodywork.

Check: the vehicle's enter/exit component has a Get Out Position assigned. The scene's RCCP camera must exist when this component is added so it can find it.

Repeat for other enterable cars. An enterable car has player control disabled until a character enters it.

4. Add a character

In the Project window, open Assets/BoneCracker Games Shared Assets/Prefabs/Character/.

View you want Drag into the Hierarchy
First person BCG_FPSCharacterController.prefab
Third person BCG_TPSCharacterController.prefab and BCG_TPSCamera.prefab

Place the character on clear ground beside the car.

For third person:

  1. Select the character's root.
  2. On its enter/exit component, enable Is TPS Controller?.
  3. Assign the orbit camera's Camera component to TPS Camera.
  4. Check Ray Height so the character's forward detection line can hit the car body.

Check: the third-person TPS Camera field is filled. Do not rely on the orbit camera finding the character to fill this separate assignment.

The supplied character prefabs already include the player enter/exit component. For your own character, add it with Tools > BoneCracker Games > Shared Assets > Enter-Exit > Add Enter-Exit To FPS Player, on the character root. This menu also supports a third-person character, with the assignments above.

5. Save and test the handoff

  1. Save your scene.
  2. Press Play and face the car from within 1.5 meters.
  3. Press Tab when the prompt appears.
  4. Drive a short distance, then stop.
  5. Wait at least a second before pressing Tab again.
  6. Check that you exit beside the door and can walk again.
  7. Stop Play Mode before making permanent adjustments.

Check: entry, driving and exit all work, with one camera controlling the view at each stage.

When it does not work

What you see What to check
No prompt near the car Get closer and face a collider on the vehicle. The detection ray reaches 1.5 meters.
No prompt anywhere Check for the enter/exit manager and read errors in the component Inspectors.
The car will not move before entry Expected: enterable cars disable player control while empty.
Tab does nothing just after entry Wait for the transition cooldown. Also check for duplicate managers.
Tab lets you in but not out Stop the car. Enter Exit Speed Limit blocks exit above its threshold.
The camera does not switch Check that an RCCP camera was present when the vehicle component was added.
Entry with a third-person character fails Assign TPS Camera on the character's enter/exit component.
You exit inside the car or another object Stop Play Mode and move Get Out Pos into clear space.
Mobile controls disappear at startup Enable Mobile Controller in the enter/exit settings.

Optional: change the shared settings

Open Tools > BoneCracker Games > Shared Assets > Enter-Exit > Edit Enter-Exit Settings. These settings apply to the addon across your project.

Setting What it controls
Auto Lock Mouse Cursor Locks the cursor on foot and releases it in the car; ignored for mobile control.
Start Stop Engine Starts the engine on entry and applies the exit behavior below. Turn off to manage the engine yourself.
Keep Engines Alive Leaves the engine running on exit when enabled; used only with Start Stop Engine.
Enter Exit Speed Limit Highest speed in km/h at which the player may get out.
Mobile Controller Enables the addon's touch-control workflow.

To begin already inside a car, select the character, enable Player Starts As In Vehicle, and assign the car to Vehicle.

Keyboard controls

Action Control
Walk W/A/S/D or arrow keys
Look Mouse
Enter / exit Tab
Lock cursor Right mouse button
Unlock cursor Escape

Character controls use Assets/BoneCracker Games Shared Assets/Resources/BCG_InputActions.inputactions. Edit this asset to rebind the character; it is separate from RCCP vehicle controls.

Phone controls

  1. Enable Mobile Controller in the enter/exit settings.
  2. Drag BCG_FPSTPS MobileController.prefab from Assets/BoneCracker Games Shared Assets/Prefabs/UI/ into the scene.
  3. Set up the car's own touch controls using Mobile.
  4. Test walking, looking, entering and exiting on the device.

The character canvas supplies move/look joysticks and an interaction button, switching its controls when you enter a car. It deactivates at startup when Mobile Controller is off.

For a separate interaction button, add BCG UI Interaction Button to a UI Button.

Installation details

The addon installs into Assets/BoneCracker Games Shared Assets/. Manual installation uses BCG_SharedAssets.unitypackage in RCCP's Addons/Installers/ folder.

RCCP manages the BCG_ENTEREXIT scripting symbol from the addon folder's presence. Check Welcome Window > Keys if its integration status looks wrong.

Next step

Back to the guide

BoneCracker Games · Realistic Car Controller ProBack to top ↑
Document details

Generated from: 23_integration_enter_exit.md
Date: 2026-09-16 02:11
Generated by md-to-html