Jolt Physics
A multi core friendly Game Physics Engine
|
Configuration for the transmission of a vehicle (gear box) More...
#include <VehicleTransmission.h>
Public Member Functions | |
void | SaveBinaryState (StreamOut &inStream) const |
Saves the contents in binary form to inStream. | |
void | RestoreBinaryState (StreamIn &inStream) |
Restores the contents in binary form to inStream. | |
Public Attributes | |
ETransmissionMode | mMode = ETransmissionMode::Auto |
How to switch gears. | |
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. | |
Array< float > | mReverseGearRatios { -2.90f } |
Ratio in rotation rate between engine and gear box when driving in reverse. | |
float | mSwitchTime = 0.5f |
How long it takes to switch gears (s), only used in auto mode. | |
float | mClutchReleaseTime = 0.3f |
How long it takes to release the clutch (go to full friction), only used in auto mode. | |
float | mSwitchLatency = 0.5f |
How long to wait after releasing the clutch before another switch is attempted (s), only used in auto mode. | |
float | mShiftUpRPM = 4000.0f |
If RPM of engine is bigger then this we will shift a gear up, only used in auto mode. | |
float | mShiftDownRPM = 2000.0f |
If RPM of engine is smaller then this we will shift a gear down, only used in auto mode. | |
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) | |
Configuration for the transmission of a vehicle (gear box)
void VehicleTransmissionSettings::RestoreBinaryState | ( | StreamIn & | inStream | ) |
Restores the contents in binary form to inStream.
void VehicleTransmissionSettings::SaveBinaryState | ( | StreamOut & | inStream | ) | const |
Saves the contents in binary form to inStream.
float VehicleTransmissionSettings::mClutchReleaseTime = 0.3f |
How long it takes to release the clutch (go to full friction), only used in auto mode.
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)
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.
ETransmissionMode VehicleTransmissionSettings::mMode = ETransmissionMode::Auto |
How to switch gears.
Array<float> VehicleTransmissionSettings::mReverseGearRatios { -2.90f } |
Ratio in rotation rate between engine and gear box when driving in reverse.
float VehicleTransmissionSettings::mShiftDownRPM = 2000.0f |
If RPM of engine is smaller then this we will shift a gear down, only used in auto mode.
float VehicleTransmissionSettings::mShiftUpRPM = 4000.0f |
If RPM of engine is bigger then this we will shift a gear up, only used in auto mode.
float VehicleTransmissionSettings::mSwitchLatency = 0.5f |
How long to wait after releasing the clutch before another switch is attempted (s), only used in auto mode.
float VehicleTransmissionSettings::mSwitchTime = 0.5f |
How long it takes to switch gears (s), only used in auto mode.