Jolt Physics
A multi core friendly Game Physics Engine
Loading...
Searching...
No Matches
VehicleTransmissionSettings Class Reference

Configuration for the transmission of a vehicle (gear box) More...

#include <VehicleTransmission.h>

Inheritance diagram for VehicleTransmissionSettings:
VehicleTransmission

Public Member Functions

void SaveBinaryState (StreamOut &inStream) const
 Saves the contents in binary form to inStream. More...
 
void RestoreBinaryState (StreamIn &inStream)
 Restores the contents in binary form to inStream. More...
 

Public Attributes

ETransmissionMode mMode = ETransmissionMode::Auto
 How to switch gears. More...
 
Array< float > mGearRatios { 2.66f, 1.78f, 1.3f, 1.0f, 0.74f }
 Ratio in rotation rate between engine and gear box, first element is 1st gear, 2nd element 2nd gear etc. More...
 
Array< float > mReverseGearRatios { -2.90f }
 Ratio in rotation rate between engine and gear box when driving in reverse. More...
 
float mSwitchTime = 0.5f
 How long it takes to switch gears (s), only used in auto mode. More...
 
float mClutchReleaseTime = 0.3f
 How long it takes to release the clutch (go to full friction), only used in auto mode. More...
 
float mSwitchLatency = 0.5f
 How long to wait after releasing the clutch before another switch is attempted (s), only used in auto mode. More...
 
float mShiftUpRPM = 4000.0f
 If RPM of engine is bigger then this we will shift a gear up, only used in auto mode. More...
 
float mShiftDownRPM = 2000.0f
 If RPM of engine is smaller then this we will shift a gear down, only used in auto mode. More...
 
float mClutchStrength = 10.0f
 Strength of the clutch when fully engaged. Total torque a clutch applies is Torque = ClutchStrength * (Velocity Engine - Avg Velocity Wheels At Clutch) (units: k m^2 s^-1) More...
 

Detailed Description

Configuration for the transmission of a vehicle (gear box)

Member Function Documentation

◆ RestoreBinaryState()

void VehicleTransmissionSettings::RestoreBinaryState ( StreamIn inStream)

Restores the contents in binary form to inStream.

◆ SaveBinaryState()

void VehicleTransmissionSettings::SaveBinaryState ( StreamOut inStream) const

Saves the contents in binary form to inStream.

Member Data Documentation

◆ mClutchReleaseTime

float VehicleTransmissionSettings::mClutchReleaseTime = 0.3f

How long it takes to release the clutch (go to full friction), only used in auto mode.

◆ mClutchStrength

float VehicleTransmissionSettings::mClutchStrength = 10.0f

Strength of the clutch when fully engaged. Total torque a clutch applies is Torque = ClutchStrength * (Velocity Engine - Avg Velocity Wheels At Clutch) (units: k m^2 s^-1)

◆ mGearRatios

Array<float> VehicleTransmissionSettings::mGearRatios { 2.66f, 1.78f, 1.3f, 1.0f, 0.74f }

Ratio in rotation rate between engine and gear box, first element is 1st gear, 2nd element 2nd gear etc.

◆ mMode

ETransmissionMode VehicleTransmissionSettings::mMode = ETransmissionMode::Auto

How to switch gears.

◆ mReverseGearRatios

Array<float> VehicleTransmissionSettings::mReverseGearRatios { -2.90f }

Ratio in rotation rate between engine and gear box when driving in reverse.

◆ mShiftDownRPM

float VehicleTransmissionSettings::mShiftDownRPM = 2000.0f

If RPM of engine is smaller then this we will shift a gear down, only used in auto mode.

◆ mShiftUpRPM

float VehicleTransmissionSettings::mShiftUpRPM = 4000.0f

If RPM of engine is bigger then this we will shift a gear up, only used in auto mode.

◆ mSwitchLatency

float VehicleTransmissionSettings::mSwitchLatency = 0.5f

How long to wait after releasing the clutch before another switch is attempted (s), only used in auto mode.

◆ mSwitchTime

float VehicleTransmissionSettings::mSwitchTime = 0.5f

How long it takes to switch gears (s), only used in auto mode.


The documentation for this class was generated from the following files: