Merge remote-tracking branch 'origin/havok' into particles
Conflicts: src/Components/Vehicle.h
This commit is contained in:
@@ -6,16 +6,16 @@
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct Box : Component
|
||||
struct BoxShape : Component
|
||||
{
|
||||
Box()
|
||||
BoxShape()
|
||||
: Width(1.f), Height(1.f), Depth(1.f){ }
|
||||
|
||||
float Width;
|
||||
float Height;
|
||||
float Depth;
|
||||
|
||||
virtual Box* Clone() const override { return new Box(*this); }
|
||||
virtual BoxShape* Clone() const override { return new BoxShape(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
#ifndef Components_HingeConstraint_h__
|
||||
#define Components_HingeConstraint_h__
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct HingeConstraint : Component
|
||||
{
|
||||
EntityID LinkedEntity;
|
||||
glm::vec3 Pivot;
|
||||
glm::vec3 Axis;
|
||||
|
||||
virtual HingeConstraint* Clone() const override { return new HingeConstraint(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // Components_HingeConstraint_h__
|
||||
@@ -0,0 +1,19 @@
|
||||
#ifndef Components_MeshShape_h__
|
||||
#define Components_MeshShape_h__
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct MeshShape : Component
|
||||
{
|
||||
std::string ResourceName;
|
||||
|
||||
virtual MeshShape* Clone() const override { return new MeshShape(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
#endif // !Components_MeshShape_h__
|
||||
@@ -6,14 +6,14 @@
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct Sphere : Component
|
||||
struct SphereShape : Component
|
||||
{
|
||||
Sphere()
|
||||
SphereShape()
|
||||
: Radius(1.f){ }
|
||||
|
||||
float Radius;
|
||||
|
||||
virtual Sphere* Clone() const override { return new Sphere(*this); }
|
||||
virtual SphereShape* Clone() const override { return new SphereShape(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
#ifndef TankSteering_h__
|
||||
#define TankSteering_h__
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
struct TankSteering : Component
|
||||
{
|
||||
TankSteering* Clone() const override { return new TankSteering(*this); }
|
||||
};
|
||||
}
|
||||
|
||||
#endif // TankSteering_h__
|
||||
@@ -10,7 +10,8 @@ namespace Components
|
||||
struct Vehicle : Component
|
||||
{
|
||||
Vehicle()
|
||||
: MaxTorque(500.0f), MinRPM(1000.0f), OptimalRPM(5500.0f), MaxRPM(7500.0f), MaxSteeringAngle(35), TopSpeed(50.0f) { }
|
||||
: MaxTorque(1000.0f), MinRPM(1000.0f), OptimalRPM(3000.0f), MaxRPM(4000.0f), MaxSteeringAngle(35), TopSpeed(130.0f),
|
||||
MaxSpeedFullSteeringAngle(40.0f){ }
|
||||
|
||||
float MaxTorque;
|
||||
float MinRPM;
|
||||
@@ -18,8 +19,10 @@ struct Vehicle : Component
|
||||
float MaxRPM;
|
||||
// Degrees
|
||||
float MaxSteeringAngle;
|
||||
//TopSpeed not working fully yet
|
||||
float TopSpeed;
|
||||
|
||||
float MaxSpeedFullSteeringAngle;
|
||||
|
||||
Vehicle* Clone() const override { return new Vehicle(*this); }
|
||||
};
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
#ifndef Components_WheelPair_h__
|
||||
#define Components_WheelPair_h__
|
||||
|
||||
#include "Component.h"
|
||||
|
||||
namespace Components
|
||||
{
|
||||
|
||||
struct WheelPair : Component
|
||||
{
|
||||
// Flag for pair wheels
|
||||
|
||||
virtual WheelPair* Clone() const override { return new WheelPair(*this); }
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
#endif // Components_WheelPair_h__
|
||||
Reference in New Issue
Block a user