VehicleSetup componentbased.
This commit is contained in:
@@ -8,7 +8,15 @@ namespace Components
|
||||
|
||||
struct Vehicle : Component
|
||||
{
|
||||
|
||||
Vehicle()
|
||||
: MaxTorque(500.0f), MinRPM(1000.0f), OptimalRPM(5500.0f), MaxRPM(7500.0f), MaxSteeringAngle(35), TopSpeed(50.0f) { }
|
||||
float MaxTorque;
|
||||
float MinRPM;
|
||||
float OptimalRPM;
|
||||
float MaxRPM;
|
||||
// Degrees
|
||||
float MaxSteeringAngle;
|
||||
float TopSpeed;
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
#ifndef Components_Wheel_h__
|
||||
#define Components_Wheel_h__
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct Wheel : Component
|
||||
{
|
||||
Wheel()
|
||||
: AxleID(0), Radius(0), Width(0), Mass(0), Steering(false), DownDirection(glm::vec3(0, -1, 0)), Friction(1.5f), SlipAngle(0.0f),
|
||||
MaxBreakingTorque(1500.0f), ConnectedToHandbrake(false), SuspensionStrength(50.0f) { }
|
||||
|
||||
// The Hardpoint MUST be positioned INSIDE the chassis.
|
||||
glm::vec3 Hardpoint;
|
||||
unsigned int AxleID;
|
||||
float Radius;
|
||||
float Width;
|
||||
float Mass;
|
||||
bool Steering;
|
||||
glm::vec3 DownDirection;
|
||||
|
||||
float SuspensionStrength;
|
||||
float Friction;
|
||||
float SlipAngle;
|
||||
float MaxBreakingTorque;
|
||||
bool ConnectedToHandbrake;
|
||||
};
|
||||
|
||||
}
|
||||
#endif // Components_Wheel_h__
|
||||
Reference in New Issue
Block a user