Tank with 8 wheels

This commit is contained in:
ViktorLjung
2014-05-11 01:52:00 +02:00
parent 4c0b465c7f
commit d7e5630f1b
10 changed files with 357 additions and 64 deletions
+3 -1
View File
@@ -14,7 +14,7 @@ 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) { }
MaxBreakingTorque(1500.0f), ConnectedToHandbrake(false), SuspensionStrength(50.0f), TorqueRatio(0.25f) { }
// The Hardpoint MUST be positioned INSIDE the chassis.
glm::vec3 Hardpoint;
@@ -30,6 +30,8 @@ struct Wheel : Component
float SlipAngle;
float MaxBreakingTorque;
bool ConnectedToHandbrake;
// The wheels total TorqueRatio must be equal to 1
float TorqueRatio;
private:
int ID;
+16
View File
@@ -0,0 +1,16 @@
#ifndef Components_WheelPair_h__
#define Components_WheelPair_h__
#include "Component.h"
namespace Components
{
struct WheelPair : Component
{
// Flag for pair wheels
};
}
#endif // Components_WheelPair_h__