Vehicle component based, wheel rotation and position not working.

This commit is contained in:
ViktorLjung
2014-04-22 19:14:35 +02:00
parent f0b2f2a659
commit eb6cc266a3
7 changed files with 410 additions and 18 deletions
+4 -2
View File
@@ -3,13 +3,15 @@
#include "Component.h"
namespace Components
{
struct Vehicle : Component
{
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;
+7
View File
@@ -3,11 +3,15 @@
#include "Component.h"
namespace Systems { class PhysicsSystem; }
namespace Components
{
struct Wheel : Component
{
friend class Systems::PhysicsSystem;
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) { }
@@ -26,6 +30,9 @@ struct Wheel : Component
float SlipAngle;
float MaxBreakingTorque;
bool ConnectedToHandbrake;
private:
int ID;
};
}