|
Engine²
Open-source game engine written in C++.
|
Settings for an individual wheel in a vehicle. More...
#include <WheelSettings.hpp>
Static Public Member Functions | |
| static WheelSettings | CreateFrontWheel () |
| Create default front wheel settings with steering. | |
| static WheelSettings | CreateRearWheel () |
| Create default rear wheel settings without steering. | |
Public Attributes | |
| float | radius = 0.3f |
| Wheel radius in meters. | |
| float | width = 0.1f |
| Wheel width in meters (for cylinder collider). | |
| float | suspensionMaxLength = 0.3f |
| Maximum suspension extension length in meters. | |
| float | suspensionMinLength = 0.0f |
| Minimum suspension compression length in meters (usually 0). | |
| float | suspensionFrequency = 1.5f |
| float | suspensionDamping = 0.5f |
| float | maxSteerAngle = 0.0f |
| Maximum steering angle in radians (0 for non-steered wheels). | |
| float | inertia = 0.9f |
| float | angularDamping = 0.2f |
| std::vector< FrictionCurvePoint > | longitudinalFriction |
| std::vector< FrictionCurvePoint > | lateralFriction |
| float | maxBrakeTorque = 1500.0f |
| Maximum brake torque (Nm) that can be applied to this wheel. | |
| float | maxHandBrakeTorque = 4000.0f |
| Maximum handbrake torque (Nm) - usually only applied to rear wheels. | |
Settings for an individual wheel in a vehicle.
Defines physical properties of a single wheel including suspension, dimensions, and friction characteristics.
|
inlinestatic |
Create default front wheel settings with steering.
|
inlinestatic |
Create default rear wheel settings without steering.
| float Physics::Component::WheelSettings::angularDamping = 0.2f |
Angular damping factor: dw/dt = -c * w Value should be zero or positive, usually close to 0
| float Physics::Component::WheelSettings::inertia = 0.9f |
Moment of inertia (kg m^2) of the wheel For a cylinder: I = 0.5 * M * R^2 Example: 0.9 for wheel with mass 20kg and radius 0.3m
| std::vector<FrictionCurvePoint> Physics::Component::WheelSettings::lateralFriction |
Lateral friction curve (sideways/slip angle direction) X-axis: Slip angle in degrees (angle between velocity and tire direction) Y-axis: Friction coefficient (typically 0-1.2) Default: realistic tire slip angle curve
| std::vector<FrictionCurvePoint> Physics::Component::WheelSettings::longitudinalFriction |
Longitudinal friction curve (forward/backward direction) X-axis: Slip ratio = (omega_wheel * r_wheel - v_longitudinal) / |v_longitudinal| Y-axis: Friction coefficient (typically 0-1.2) Default: realistic tire slip curve with peak at 6% slip
| float Physics::Component::WheelSettings::maxBrakeTorque = 1500.0f |
Maximum brake torque (Nm) that can be applied to this wheel.
| float Physics::Component::WheelSettings::maxHandBrakeTorque = 4000.0f |
Maximum handbrake torque (Nm) - usually only applied to rear wheels.
| float Physics::Component::WheelSettings::maxSteerAngle = 0.0f |
Maximum steering angle in radians (0 for non-steered wheels).
| float Physics::Component::WheelSettings::radius = 0.3f |
Wheel radius in meters.
| float Physics::Component::WheelSettings::suspensionDamping = 0.5f |
Suspension damping ratio (0 = no damping, 1 = critical damping) Typical car values are 0.3-0.7
| float Physics::Component::WheelSettings::suspensionFrequency = 1.5f |
Suspension spring frequency in Hz (typically 1.0-2.0 for cars) Higher values = stiffer suspension
| float Physics::Component::WheelSettings::suspensionMaxLength = 0.3f |
Maximum suspension extension length in meters.
| float Physics::Component::WheelSettings::suspensionMinLength = 0.0f |
Minimum suspension compression length in meters (usually 0).
| float Physics::Component::WheelSettings::width = 0.1f |
Wheel width in meters (for cylinder collider).