F-Gear Vehicle Physics

FGear is an advanced vehicle physics solution for Unity and Unreal. It's built for racing, drifting and offroading alike: cast-based or rigidbody wheels, three tire models and a drivetrain you can retune at runtime. From four-wheel cars to bikes, trucks and multi-axle vehicles, it covers the full range.

Try the demo

Take it for a drive with a PC build.

Unity Demo

See it in action

Visit the youtube channel for tutorials and more.

Screenshots

Select an image to view it larger.

Core features

Everything you need for a driveable vehicle, in one component.

General

  • Desktop or mobile, full source code
  • Single vehicle component drives a complete vehicle
  • Adjustable substep rate
  • Mass, inertia scale, center-of-mass offset overrides; optional custom gravity vector
  • FWD/RWD/AWD driveline presets and arbitrary custom differential trees
  • Sleep system for optimization
  • Save/restore full vehicle state at runtime (rewind/replay)
  • JSON save/load of a whole vehicle setup for fast prototyping
  • Simplified Pacejka, Pacejka 96 and Magic Formula 6.1 tire models
  • Sticky tire mode (eliminates low speed issues of Pacejka models)
  • Tire pressure and tire wear
  • Shipped tire preset libraries across different families like street/track/drift etc.
  • Runtime per-wheel modification of all stats

Wheels & suspension

  • 3D wheel contact: multiple raycasts, longitudinal and lateral ray grids, sphere cast, convex mesh cast (configurable side count)
  • Raycast prediction, early-hit skipping, layer mask, trigger ignoring
  • Rigidbody wheel mode: the wheel becomes a real collider on a joint-driven hub, picking up tread, sidewall and rim contacts that casts cannot see
  • Tire deformation based on tire pressure and sidewall height
  • Spring/damper suspension with preload, up/down travel, compression limit; advanced mode with authored spring-rate and compression/relaxation damper curves
  • Geometry offsets: cast, spacer, forward, vertical, rim, suspension offset
  • Wheels can be deactivated at runtime

Drivetrain & axles

  • Torque curve based engine model
  • Engine stalling
  • Engine rev matching
  • Turbo simulation, with 5 preset configurations or custom setup
  • Turbo antilag
  • Clutch simulation with automatic mode
  • Clutch anti-stall assist
  • Auto / sequential / manual h-pattern transmissions
  • Open, locked, LSD, torsen, fixed-share and split-ratio differential types; chainable into center/axle trees
  • Differential-steer (tank/skid steer) mode
  • Ackerman steering with adjustable coefficient and reference wheel
  • Toe, camber (min/max), caster, kingpin
  • Solid-axle mode with articulation limit
  • Per-axle handbrake, brake and torque distribution, multi-wheel axles

Aero

  • Aerodynamic effects including drag and downforce from coefficients and air density, with front/rear downforce split

Input

  • StandardInput with keyboard, joystick, and wheel+shifter (h-pattern) support
  • Dual input backend: legacy Input Manager and the new Input System, with AUTO resolution and fallback Unity only
  • InputProfile system — all shared input settings live in one reusable asset with a runtime copy

Driving aids

  • ABS and ASR
  • Understeer and oversteer (ESP) assists
  • Steering assist for counter steering
  • Per-axle anti-roll bars
  • Reverse braking and hill holder
  • Idle drive assist

Collisions

  • Vehicle body physical material overrides
  • Vehicle body contact smoothing
  • Vehicle body deformation with allowed depth, deformation curve and elasticity
  • Generated wheel colliders with their own material (procedural cylinders)

Telemetry

  • In-game telemetry windows per subsystem
  • Geometry, hit-normal and tire-force gizmos
  • Custom inspectors with tooltip help for vehicle, tire models and input profile asset

Extras

Features used to build the demo scenes, included for you to reuse.

  • OrbitCamera3rd person camera with many options
  • AIControllerSpline-following AI driver with speed curve and look-ahead steering
  • CarManager Unity onlyMulti-vehicle manager that features vehicle switching, rankings, countdown, reset/respawn with collision-off and flicker, muting others etc.
  • Effects
    • Surface types from physic materials or terrain
    • Procedural bumps
    • Procedural engine and turbo sound
    • Tire smoke and skidmarks (mesh generation and sound)
    • And many more
  • ForceFeedbackDirectInput forcefeedback sample (self-align, road vibration, constant friction, speed-scaled steering damper & collision force)
  • JoystickVibration Unity only needs XInputDotNetXInput sample (commented out)
  • GaugeUISpeedometer, traction, suspension, steering and g-sensor gauges
  • MinimapToolMinimap helper for spline-based minimap with vehicle markers
  • MobileInputControls the vehicle via UI buttons
  • ArcadeAssists
    • Understeer/oversteer recovery
    • Anti-roll bars
    • Yaw control assists
    • PID based cruise control
    • Pitch/roll air stabilizers
  • BikeHelperLean/roll control and wheelie/stoppie helpers
  • TireSwitcherRuntime tire-model picker, one dropdown per axle
  • StatisticsTracks and displays some stats (0-100, 0-200, 100-0 braking, drift angle/score/distance, lap times)
  • RewindReplayRing-buffer rewind and replay from VehicleState
  • RuntimeSample Unreal: modify onlyVehicle built and modified entirely from script at runtime
  • NetworkSample / NetworkSync Unity only needs PUN2Multiplayer sample using projected velocity blending
  • PitchDecouplerKeeps chosen transforms (brake calipers etc.) from inheriting body pitch
  • SplineToolBezier path tool used by AI, minimap and lap timing
  • SkidmarkPooled skidmark mesh renderer
  • DebugCharts Unity onlyReal-time multi-channel plotting of some vehicle/wheel data

Questions, problems or suggestions?

Write to us and we'll get back to you.

Coming soon

FGear 2 for Unreal is still in development.