|
Engine²
Open-source game engine written in C++.
|
Main vehicle component containing all configuration. More...
#include <Vehicle.hpp>
Static Public Member Functions | |
| static std::array< glm::vec3, 4 > | GetDefaultWheelPositions () |
| Get default wheel positions relative to chassis center. | |
| static Vehicle | CreateDefaultCar () |
| Create a default RWD sports car configuration. | |
Public Attributes | |
| std::array< WheelSettings, static_cast< size_t >(WheelIndex::Count)> | wheels |
| Wheel settings for all 4 wheels (indexed by WheelIndex). | |
| DrivetrainType | drivetrain = DrivetrainType::RWD |
| Drivetrain configuration. | |
| EngineSettings | engine |
| Engine configuration. | |
| GearboxSettings | gearbox |
| Gearbox configuration. | |
| RollbarSettings | rollbar |
| Rollbar configuration. | |
| std::array< Engine::EntityId, 4 > | wheelEntities |
| Wheel entities for visual representation. | |
| std::array< glm::vec3, 4 > | wheelPositions = GetDefaultWheelPositions() |
| Wheel positions relative to chassis center. | |
| CollisionTesterType | collisionTesterType = CollisionTesterType::CastCylinder |
| Collision tester type for wheel-ground detection (default: CastCylinder). | |
| float | convexRadiusFraction = 0.5f |
Main vehicle component containing all configuration.
This is the user-facing component that defines vehicle behavior. Attach this to the chassis entity to create a drivable vehicle.
|
inlinestatic |
Create a default RWD sports car configuration.
|
inlinestatic |
Get default wheel positions relative to chassis center.
Default positions assume a standard car layout:
| CollisionTesterType Physics::Component::Vehicle::collisionTesterType = CollisionTesterType::CastCylinder |
Collision tester type for wheel-ground detection (default: CastCylinder).
| float Physics::Component::Vehicle::convexRadiusFraction = 0.5f |
Convex radius fraction for CastCylinder tester (0.0 to 1.0) Higher values help prevent ghost collisions (default: 0.5, increase if needed)
| DrivetrainType Physics::Component::Vehicle::drivetrain = DrivetrainType::RWD |
Drivetrain configuration.
| EngineSettings Physics::Component::Vehicle::engine |
Engine configuration.
| GearboxSettings Physics::Component::Vehicle::gearbox |
Gearbox configuration.
| RollbarSettings Physics::Component::Vehicle::rollbar |
Rollbar configuration.
| std::array<Engine::EntityId, 4> Physics::Component::Vehicle::wheelEntities |
Wheel entities for visual representation.
| std::array<glm::vec3, 4> Physics::Component::Vehicle::wheelPositions = GetDefaultWheelPositions() |
Wheel positions relative to chassis center.
| std::array<WheelSettings, static_cast<size_t>(WheelIndex::Count)> Physics::Component::Vehicle::wheels |
Wheel settings for all 4 wheels (indexed by WheelIndex).