Tank tower and barrel steering working

This commit is contained in:
ViktorLjung
2014-05-12 22:33:53 +02:00
parent 92e9fd1049
commit 38482431a1
17 changed files with 246 additions and 96 deletions
+20
View File
@@ -0,0 +1,20 @@
#ifndef BarrelSteering_h__
#define BarrelSteering_h__
#include "Component.h"
namespace Components
{
struct BarrelSteering : Component
{
BarrelSteering()
: Velocity(1.f), Axis(glm::vec3(0,1,0)){ }
float Velocity;
glm::vec3 Axis;
};
}
#endif // BarrelSteering_h__
+20
View File
@@ -0,0 +1,20 @@
#ifndef TowerSteering_h__
#define TowerSteering_h__
#include "Component.h"
namespace Components
{
struct TowerSteering : Component
{
TowerSteering()
: Velocity(1.f), Axis(glm::vec3(0,1,0)){ }
float Velocity;
glm::vec3 Axis;
};
}
#endif // TowerSteering_h__
+2 -1
View File
@@ -11,7 +11,7 @@ struct Vehicle : Component
{
Vehicle()
: MaxTorque(1000.0f), MinRPM(1000.0f), OptimalRPM(3000.0f), MaxRPM(4000.0f), MaxSteeringAngle(35), TopSpeed(130.0f),
MaxSpeedFullSteeringAngle(40.0f){ }
MaxSpeedFullSteeringAngle(40.0f), SpringDamping(1.f){ }
float MaxTorque;
float MinRPM;
@@ -22,6 +22,7 @@ struct Vehicle : Component
//TopSpeed not working fully yet
float TopSpeed;
float MaxSpeedFullSteeringAngle;
float SpringDamping;
};
}