Skip to main content

Vehicles

HELIX uses the HVehicle class to handle all drivable vehicles -- cars, trucks, boats, you name it. The system handles physics, engine simulation, fuel, and lighting so you can focus on building great driving experiences.

Spawning a Vehicleโ€‹

Drop a vehicle into your world by creating a new HVehicle instance with a position, rotation, and Blueprint asset reference.

Blueprintโ€” Spawn a vehicle at a locationScroll to zoom ยท Drag to pan ยท Drag nodes to move
Event BeginPlaySpawn HVehicleLocation(1000, 0, 50)Rotation(0, 90, 0)Asset"BP_Sedan"Vehicle

Driving Controlsโ€‹

HVehicle exposes direct input controls for throttle, steering, braking, and the handbrake. You can also manage the engine lifecycle and fuel system.

Blueprintโ€” Vehicle throttle, steering, brakes, and handbrakeScroll to zoom ยท Drag to pan ยท Drag nodes to move
Event BeginPlaySet Throttle InputTargetValue1.0Set Steering InputTargetValue-0.5Set Brake InputTargetValue1.0Set Hand Brake InputTargetEnabledtrue

Steering input ranges from -1.0 (full left) to 1.0 (full right). Throttle and brake range from 0.0 to 1.0.

Fuel & Engineโ€‹

HVehicle includes a fuel system and engine lifecycle controls. You can set fuel levels, start and stop the engine, and monitor engine health.

Blueprintโ€” Fuel, engine starter, and health checkScroll to zoom ยท Drag to pan ยท Drag nodes to move
Event BeginPlaySet FuelTargetFuel1.0Hold StarterTargetDuration0.5Release StarterTargetGet Engine HealthTargetHealth

Lights & Sirensโ€‹

HVehicle provides fine-grained control over vehicle lighting, including indicators, brake lights, hazard lights, and sirens for emergency vehicles.

Blueprintโ€” Hazard lights, siren, and indicatorsScroll to zoom ยท Drag to pan ยท Drag nodes to move
Event BeginPlaySet Hazard LightTargetEnabledtrueSet Siren StateTargetEnabledtrueSet Left IndicatorTargetEnabledtrue
tip

You can find a variety of ready-to-use vehicle assets in Vault, or import your own custom meshes with custom seat and door configurations.

โœจ