FGear Vehicle Physics (v1.4)

v1.7 is now available

  • Reworked powertrain
  • Sleeping (auto/manual)
  • Rev-matching option for transmission
  • Stall assist option for clutch
  • Spacer offset option
  • Simple cruise control with a PID controller

Warning: To use the example project with Unreal5 copy the FGearPlugin folder in Unreal5\Engine\Plugins to FGearExample\Plugins folder.

Notes

  • From now on the changelog can be found in the “0-Overview.pdf” document
  • All gettters are now const functions, you might need to reiterate your blueprints
  • All the sample vehicles have more realistic wheel mass values now
  • All the sample vehicles’ linear and angular damping values are updated. Even having a small linear damping value can change the acceleration performance of the vehicle especially at high speeds
  • Clutch value is also displayed on the gauge telemetry now
  • An option called optimum slip weight is added, this helps to reduce the speed mismatch between the engine and wheel rpms. This is an experimental feature and can affect the overall driving behavior so be cautious with it.
  • Fixed the case where 4wd vehicles failed to generate correct torque output
  • You can manually put a vehicle into sleep and/or wake it by calling sleep/wakeUp functions. This is demonstrated in the dragrace map, all the vehicles are put to sleep at the finish line.
  • Added a new sample scene that demonstrates the auto sleeping of vehicles. Sleeping vehicles color turn to black and they go back to original when they wake up. If you set a minimum linear and angular speed threshold then the vehicle will automatically sleep when the conditions are met. You can also define the set of inputs that will wake the vehicle.
  • A vehicle that is touching another simulated actors bounds can’t go to sleep. This fixes a set of problems where we could just penetrate into other vehicles when they are asleep.
  • A sleeping vehicle will pause its sfx and particle effects. Muting the engine sound is optional.
  • Cruise control and the PID controller options are located in the ArcadeAssists component
  • There is a cruise speed option in the modification map gui, you can set a target speed and the vehicle will try to maintain it
  • Fixed the ArcadeAssists::setCruiseSpeed function, it was just not working correctly
  • Fixed the case where the MobileInput map could fail to get the reference of a different vehicle other then the vehicle on the map
  • Fixed a bug with the tire curve previews
  • Fixed a bug where the top speed of each gear ratio was miscalculated at editor time
  • Brake & clutch engagement curves are moved to standard input and also added a throttle engagement curve
  • Gear up and gear down velocity bias options are added, this way it will be possible to change gears based on wheel speed rather then velocity
  • Added drivetrain inertia option which is used in the wheel rotation calculations. This has a similar effect to the wheel mass option, larger inertia means slower accelerations
  • Added drivetrain friction option which is a new factor that slows down the vehicle. Unlike wheel roll resistance this is a constant factor
  • Reverse brake option added, if you press throttle while going backwards in 1st gear the vehicle will automatically brake for you. The same thing works with the reverse gear.
  • Spacer offset will add distance between the left and right wheels, resulting a wider track. Do not confuse it with the rim offset which only moves the physics representation.
  • A new set of vehicles are included in the example project now, these are from Epic’s free content and they have slightly different setups.
  • A new sandbox map is added to the example project with the new vehicles including a truck jointed to its trailer. Truck & trailer has a special reset function so in order to reset them you need to press Shift + R.
  • Added minimum ABS speed parameter, below this speed ABS will not work. This is added to avoid a problem where the brakes fail to fully stop the vehicle with ABS.
  • Replication component is now depreciated, it will be re-implemented with the following updates
3 Likes