|
Engine²
Open-source game engine written in C++.
|
Gearbox configuration for vehicle transmission. More...
#include <Vehicle.hpp>
Public Attributes | |
| TransmissionMode | mode = TransmissionMode::Auto |
| Transmission mode (auto or manual shifting). | |
| std::vector< float > | forwardGearRatios = {2.66f, 1.78f, 1.3f, 1.0f, 0.74f} |
| std::vector< float > | reverseGearRatios = {-2.90f} |
| int | currentGear = 1 |
| Current gear (-1 = reverse, 0 = neutral, 1 = first forward, etc.). | |
| float | switchTime = 0.5f |
| How long it takes to switch gears (s) - only used in auto mode. | |
| float | clutchReleaseTime = 0.3f |
| How long it takes to release the clutch (go to full friction) - only used in auto mode. | |
| float | switchLatency = 0.5f |
| How long to wait after releasing clutch before another switch is attempted (s) - only used in auto mode. | |
| float | shiftUpRPM = 4000.0f |
| If RPM of engine is bigger than this, shift a gear up - only used in auto mode. | |
| float | shiftDownRPM = 2000.0f |
| If RPM of engine is smaller than this, shift a gear down - only used in auto mode. | |
| float | clutchStrength = 10.0f |
| float | clutchFriction = 1.0f |
| Current clutch friction (0 = no friction, 1 = full friction) - for manual mode. | |
Gearbox configuration for vehicle transmission.
| float Physics::Component::GearboxSettings::clutchFriction = 1.0f |
Current clutch friction (0 = no friction, 1 = full friction) - for manual mode.
| float Physics::Component::GearboxSettings::clutchReleaseTime = 0.3f |
How long it takes to release the clutch (go to full friction) - only used in auto mode.
| float Physics::Component::GearboxSettings::clutchStrength = 10.0f |
Strength of the clutch when fully engaged Total torque = ClutchStrength * (Velocity Engine - Avg Velocity Wheels At Clutch) Units: kg * m^2 * s^-1
| int Physics::Component::GearboxSettings::currentGear = 1 |
Current gear (-1 = reverse, 0 = neutral, 1 = first forward, etc.).
| std::vector<float> Physics::Component::GearboxSettings::forwardGearRatios = {2.66f, 1.78f, 1.3f, 1.0f, 0.74f} |
Forward gear ratios (rotation rate between engine and gearbox) Index 0 = 1st gear, 1 = 2nd gear, etc.
| TransmissionMode Physics::Component::GearboxSettings::mode = TransmissionMode::Auto |
Transmission mode (auto or manual shifting).
| std::vector<float> Physics::Component::GearboxSettings::reverseGearRatios = {-2.90f} |
Reverse gear ratios (rotation rate between engine and gearbox when in reverse) Typically negative values. Index 0 = 1st reverse gear, etc.
| float Physics::Component::GearboxSettings::shiftDownRPM = 2000.0f |
If RPM of engine is smaller than this, shift a gear down - only used in auto mode.
| float Physics::Component::GearboxSettings::shiftUpRPM = 4000.0f |
If RPM of engine is bigger than this, shift a gear up - only used in auto mode.
| float Physics::Component::GearboxSettings::switchLatency = 0.5f |
How long to wait after releasing clutch before another switch is attempted (s) - only used in auto mode.
| float Physics::Component::GearboxSettings::switchTime = 0.5f |
How long it takes to switch gears (s) - only used in auto mode.