Meh-ish helicopter physics
This commit is contained in:
@@ -0,0 +1,16 @@
|
|||||||
|
#ifndef HelicopterSteering_h__
|
||||||
|
#define HelicopterSteering_h__
|
||||||
|
|
||||||
|
#include "Component.h"
|
||||||
|
|
||||||
|
namespace Components
|
||||||
|
{
|
||||||
|
|
||||||
|
struct HelicopterSteering : Component
|
||||||
|
{
|
||||||
|
HelicopterSteering* Clone() const override { return new HelicopterSteering(*this); }
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // HelicopterSteering_h__
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
#ifndef Events_ApplyForce_h__
|
||||||
|
#define Events_ApplyForce_h__
|
||||||
|
#include "Entity.h"
|
||||||
|
#include "EventBroker.h"
|
||||||
|
|
||||||
|
namespace Events
|
||||||
|
{
|
||||||
|
|
||||||
|
struct ApplyForce : Event
|
||||||
|
{
|
||||||
|
EntityID Entity;
|
||||||
|
double DeltaTime;
|
||||||
|
glm::vec3 Force;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif // Events_ApplyForce_h__
|
||||||
+51
-640
@@ -8,14 +8,25 @@ void GameWorld::Initialize()
|
|||||||
m_ResourceManager.Preload("Model", "Models/Placeholders/PhysicsTest/Plane.obj");
|
m_ResourceManager.Preload("Model", "Models/Placeholders/PhysicsTest/Plane.obj");
|
||||||
m_ResourceManager.Preload("Model", "Models/Placeholders/PhysicsTest/ArrowCube.obj");
|
m_ResourceManager.Preload("Model", "Models/Placeholders/PhysicsTest/ArrowCube.obj");
|
||||||
|
|
||||||
BindKey(GLFW_KEY_W, "vertical", 1.f);
|
BindKey(GLFW_KEY_W, "cam_vertical", 1.f);
|
||||||
BindKey(GLFW_KEY_S, "vertical", -1.f);
|
BindKey(GLFW_KEY_S, "cam_vertical", -1.f);
|
||||||
BindKey(GLFW_KEY_A, "horizontal", -1.f);
|
BindKey(GLFW_KEY_A, "cam_horizontal", -1.f);
|
||||||
BindKey(GLFW_KEY_D, "horizontal", 1.f);
|
BindKey(GLFW_KEY_D, "cam_horizontal", 1.f);
|
||||||
BindGamepadAxis(Gamepad::Axis::LeftX, "horizontal", 1.f);
|
BindGamepadAxis(Gamepad::Axis::LeftX, "horizontal", 1.f);
|
||||||
BindGamepadAxis(Gamepad::Axis::LeftY, "vertical", 1.f);
|
BindGamepadAxis(Gamepad::Axis::LeftY, "vertical", 1.f);
|
||||||
|
BindGamepadAxis(Gamepad::Axis::RightX, "horizontal", 1.f);
|
||||||
|
BindGamepadAxis(Gamepad::Axis::RightY, "vertical", 1.f);
|
||||||
|
BindGamepadAxis(Gamepad::Axis::RightTrigger, "normal", 1.f);
|
||||||
|
BindGamepadAxis(Gamepad::Axis::LeftTrigger, "normal", -1.f);
|
||||||
|
BindKey(GLFW_KEY_SPACE, "cam_normal", 1.f);
|
||||||
|
BindKey(GLFW_KEY_LEFT_CONTROL, "cam_normal", -1.f);
|
||||||
|
|
||||||
BindKey(GLFW_KEY_UP, "barrel_rotation", 1.f);
|
BindKey(GLFW_KEY_LEFT_SHIFT, "cam_speed", 1.f);
|
||||||
|
BindKey(GLFW_KEY_LEFT_ALT, "cam_speed", -1.f);
|
||||||
|
|
||||||
|
BindMouseButton(GLFW_MOUSE_BUTTON_1, "cam_attack", 1.f);
|
||||||
|
|
||||||
|
/*BindKey(GLFW_KEY_UP, "barrel_rotation", 1.f);
|
||||||
BindKey(GLFW_KEY_DOWN, "barrel_rotation", -1.f);
|
BindKey(GLFW_KEY_DOWN, "barrel_rotation", -1.f);
|
||||||
BindKey(GLFW_KEY_LEFT, "tower_rotation", -1.f);
|
BindKey(GLFW_KEY_LEFT, "tower_rotation", -1.f);
|
||||||
BindKey(GLFW_KEY_RIGHT, "tower_rotation", 1.f);
|
BindKey(GLFW_KEY_RIGHT, "tower_rotation", 1.f);
|
||||||
@@ -25,8 +36,7 @@ void GameWorld::Initialize()
|
|||||||
BindKey(GLFW_KEY_SPACE, "handbrake", 1.f);
|
BindKey(GLFW_KEY_SPACE, "handbrake", 1.f);
|
||||||
BindGamepadButton(Gamepad::Button::A, "handbrake", 1.f);
|
BindGamepadButton(Gamepad::Button::A, "handbrake", 1.f);
|
||||||
|
|
||||||
BindKey(GLFW_KEY_Z, "shoot", 1.f);
|
BindKey(GLFW_KEY_Z, "shoot", 1.f);*/
|
||||||
BindGamepadAxis(Gamepad::Axis::RightTrigger, "shoot", 1.f);
|
|
||||||
|
|
||||||
//BindGamepadButton(Gamepad::Button::Up, "Gamepad::Button::Up", 1.f);
|
//BindGamepadButton(Gamepad::Button::Up, "Gamepad::Button::Up", 1.f);
|
||||||
//BindGamepadButton(Gamepad::Button::Down, "Gamepad::Button::Down", 1.f);
|
//BindGamepadButton(Gamepad::Button::Down, "Gamepad::Button::Down", 1.f);
|
||||||
@@ -45,17 +55,7 @@ void GameWorld::Initialize()
|
|||||||
|
|
||||||
RegisterComponents();
|
RegisterComponents();
|
||||||
|
|
||||||
//{
|
|
||||||
// auto camera = CreateEntity();
|
|
||||||
// auto transform = AddComponent<Components::Transform>(camera, "Transform");
|
|
||||||
// transform->Position.z = 20.f;
|
|
||||||
// transform->Position.y = 20.f;
|
|
||||||
// //transform->Orientation = glm::quat(glm::vec3(glm::pi<float>() / 8.f, 0.f, 0.f));
|
|
||||||
// auto cameraComp = AddComponent<Components::Camera>(camera, "Camera");
|
|
||||||
// cameraComp->FarClip = 2000.f;
|
|
||||||
// auto freeSteering = AddComponent<Components::FreeSteering>(camera, "FreeSteering");
|
|
||||||
// CommitEntity(camera);
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
@@ -78,646 +78,55 @@ void GameWorld::Initialize()
|
|||||||
auto meshShape = AddComponent<Components::MeshShape>(groundshape, "MeshShape");
|
auto meshShape = AddComponent<Components::MeshShape>(groundshape, "MeshShape");
|
||||||
meshShape->ResourceName = "Models/Placeholders/Terrain/Terrain2.obj";
|
meshShape->ResourceName = "Models/Placeholders/Terrain/Terrain2.obj";
|
||||||
//meshShape->ResourceName = "Models/TestScene/testScene.obj";
|
//meshShape->ResourceName = "Models/TestScene/testScene.obj";
|
||||||
|
|
||||||
|
|
||||||
CommitEntity(groundshape);
|
CommitEntity(groundshape);
|
||||||
CommitEntity(ground);
|
CommitEntity(ground);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto heli = CreateEntity();
|
||||||
|
|
||||||
/*{
|
|
||||||
auto jeep = CreateEntity();
|
|
||||||
auto transform = AddComponent<Components::Transform>(jeep, "Transform");
|
|
||||||
transform->Position = glm::vec3(0, 5, 0);
|
|
||||||
transform->Orientation = glm::angleAxis(glm::pi<float>()/2, glm::vec3(0, 1, 0));
|
|
||||||
auto physics = AddComponent<Components::Physics>(jeep, "Physics");
|
|
||||||
physics->Mass = 1800;
|
|
||||||
physics->Static = false;
|
|
||||||
auto vehicle = AddComponent<Components::Vehicle>(jeep, "Vehicle");
|
|
||||||
AddComponent<Components::Input>(jeep, "Input");
|
|
||||||
|
|
||||||
{
|
|
||||||
auto shape = CreateEntity(jeep);
|
|
||||||
auto transform = AddComponent<Components::Transform>(shape, "Transform");
|
|
||||||
auto meshShape = AddComponent<Components::MeshShape>(shape, "MeshShape");
|
|
||||||
meshShape->ResourceName = "Models/Jeep/Chassi/ChassiCollision.obj";
|
|
||||||
CommitEntity(shape);
|
|
||||||
|
|
||||||
// auto box = AddComponent<Components::Box>(jeep, "Box");
|
|
||||||
// box->Width = 1.487f;
|
|
||||||
// box->Height = 0.727f;
|
|
||||||
// box->Depth = 2.594f;
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
auto chassis = CreateEntity(jeep);
|
|
||||||
auto transform = AddComponent<Components::Transform>(chassis, "Transform");
|
|
||||||
transform->Position = glm::vec3(0, 0, 0); // 0.6577f
|
|
||||||
auto model = AddComponent<Components::Model>(chassis, "Model");
|
|
||||||
model->ModelFile = "Models/Jeep/Chassi/chassi.obj";
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
auto lightentity = CreateEntity(jeep);
|
|
||||||
auto transform = AddComponent<Components::Transform>(lightentity, "Transform");
|
|
||||||
transform->Position = glm::vec3(0, 15, 0);
|
|
||||||
auto light = AddComponent<Components::PointLight>(lightentity, "PointLight");
|
|
||||||
light->Diffuse = glm::vec3(128.f/255.f, 172.f/255.f, 242.f/255.f);
|
|
||||||
light->Specular = glm::vec3(1.f);
|
|
||||||
light->constantAttenuation = 0.3f;
|
|
||||||
light->linearAttenuation = 0.003f;
|
|
||||||
light->quadraticAttenuation = 0.002f;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//Create wheels
|
|
||||||
float wheelOffset = 0.4f;
|
|
||||||
float springLength = 0.3f;
|
|
||||||
float suspensionStrength = 35.f;
|
|
||||||
{
|
|
||||||
auto wheel = CreateEntity(jeep);
|
|
||||||
auto transform = AddComponent<Components::Transform>(wheel, "Transform");
|
|
||||||
transform->Position = glm::vec3(1.9f, 0.5546f - wheelOffset, -0.9242f);
|
|
||||||
transform->Scale = glm::vec3(1.0f);
|
|
||||||
auto model = AddComponent<Components::Model>(wheel, "Model");
|
|
||||||
model->ModelFile = "Models/Jeep/WheelFront/wheelFront.obj";
|
|
||||||
auto Wheel = AddComponent<Components::Wheel>(wheel, "Wheel");
|
|
||||||
Wheel->Hardpoint = transform->Position + glm::vec3(0.f, springLength, 0.f);
|
|
||||||
Wheel->AxleID = 0;
|
|
||||||
Wheel->Mass = 50;
|
|
||||||
Wheel->Radius = 0.837f;
|
|
||||||
Wheel->Steering = true;
|
|
||||||
Wheel->SuspensionStrength = suspensionStrength;
|
|
||||||
Wheel->Friction = 4.f;
|
|
||||||
Wheel->ConnectedToHandbrake = true;
|
|
||||||
CommitEntity(wheel);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
auto wheel = CreateEntity(jeep);
|
|
||||||
auto transform = AddComponent<Components::Transform>(wheel, "Transform");
|
|
||||||
transform->Position = glm::vec3(-1.9f, 0.5546f - wheelOffset, -0.9242f);
|
|
||||||
transform->Scale = glm::vec3(1.0f);
|
|
||||||
transform->Orientation = glm::angleAxis(glm::pi<float>(), glm::vec3(0, 0, 1));
|
|
||||||
auto model = AddComponent<Components::Model>(wheel, "Model");
|
|
||||||
model->ModelFile = "Models/Jeep/WheelFront/wheelFront.obj";
|
|
||||||
auto Wheel = AddComponent<Components::Wheel>(wheel, "Wheel");
|
|
||||||
Wheel->Hardpoint = transform->Position + glm::vec3(0.f, springLength, 0.f);
|
|
||||||
Wheel->AxleID = 0;
|
|
||||||
Wheel->Mass = 50;
|
|
||||||
Wheel->Radius = 0.837f;
|
|
||||||
Wheel->Steering = true;
|
|
||||||
Wheel->SuspensionStrength = suspensionStrength;
|
|
||||||
Wheel->Friction = 4.f;
|
|
||||||
Wheel->ConnectedToHandbrake = true;
|
|
||||||
CommitEntity(wheel);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
auto wheel = CreateEntity(jeep);
|
|
||||||
auto transform = AddComponent<Components::Transform>(wheel, "Transform");
|
|
||||||
transform->Position = glm::vec3(0.2726f, 0.2805f - wheelOffset, 1.9307f);
|
|
||||||
auto model = AddComponent<Components::Model>(wheel, "Model");
|
|
||||||
model->ModelFile = "Models/Jeep/WheelBack/wheelBack.obj";
|
|
||||||
auto Wheel = AddComponent<Components::Wheel>(wheel, "Wheel");
|
|
||||||
Wheel->Hardpoint = transform->Position + glm::vec3(0.f, springLength, 0.f);
|
|
||||||
Wheel->AxleID = 1;
|
|
||||||
Wheel->Mass = 50;
|
|
||||||
Wheel->Radius = 0.737f;
|
|
||||||
Wheel->Steering = false;
|
|
||||||
Wheel->SuspensionStrength = suspensionStrength;
|
|
||||||
Wheel->Friction = 4.f;
|
|
||||||
Wheel->ConnectedToHandbrake = true;
|
|
||||||
CommitEntity(wheel);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
auto wheel = CreateEntity(jeep);
|
|
||||||
auto transform = AddComponent<Components::Transform>(wheel, "Transform");
|
|
||||||
transform->Position = glm::vec3(-0.2726f, 0.2805f - wheelOffset, 1.9307f);
|
|
||||||
transform->Orientation = glm::angleAxis(glm::pi<float>(), glm::vec3(0, 0, 1));
|
|
||||||
auto model = AddComponent<Components::Model>(wheel, "Model");
|
|
||||||
model->ModelFile = "Models/Jeep/WheelBack/wheelBack.obj";
|
|
||||||
auto Wheel = AddComponent<Components::Wheel>(wheel, "Wheel");
|
|
||||||
Wheel->Hardpoint = transform->Position + glm::vec3(0.f, springLength, 0.f);
|
|
||||||
Wheel->AxleID = 1;
|
|
||||||
Wheel->Mass = 50;
|
|
||||||
Wheel->Radius = 0.737f;
|
|
||||||
Wheel->Steering = false;
|
|
||||||
Wheel->SuspensionStrength = suspensionStrength;
|
|
||||||
Wheel->Friction = 4.f;
|
|
||||||
Wheel->ConnectedToHandbrake = true;
|
|
||||||
CommitEntity(wheel);
|
|
||||||
}
|
|
||||||
|
|
||||||
CommitEntity(jeep);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
auto tank = CreateEntity();
|
|
||||||
auto transform = AddComponent<Components::Transform>(tank, "Transform");
|
|
||||||
transform->Position = glm::vec3(0, 5, 0);
|
|
||||||
//transform->Orientation = glm::angleAxis(0.f, glm::vec3(0, 1, 0));
|
|
||||||
auto physics = AddComponent<Components::Physics>(tank, "Physics");
|
|
||||||
physics->Mass = 45000;
|
|
||||||
physics->Static = false;
|
|
||||||
auto vehicle = AddComponent<Components::Vehicle>(tank, "Vehicle");
|
|
||||||
vehicle->MaxTorque = 5200.f;
|
|
||||||
AddComponent<Components::TankSteering>(tank, "TankSteering");
|
|
||||||
AddComponent<Components::Input>(tank, "Input");
|
|
||||||
|
|
||||||
{
|
{
|
||||||
auto shape = CreateEntity(tank);
|
auto transform = AddComponent<Components::Transform>(heli, "Transform");
|
||||||
auto transform = AddComponent<Components::Transform>(shape, "Transform");
|
transform->Position = glm::vec3(0.f, 3.f, 10.f);
|
||||||
auto meshShape = AddComponent<Components::MeshShape>(shape, "MeshShape");
|
auto physics = AddComponent<Components::Physics>(heli, "Physics");
|
||||||
meshShape->ResourceName = "Models/Tank/Fix/ChassiCollision.obj";
|
physics->Mass = 3000;
|
||||||
CommitEntity(shape);
|
auto heliComponent = AddComponent<Components::HelicopterSteering>(heli, "HelicopterSteering");
|
||||||
|
|
||||||
// auto box = AddComponent<Components::Box>(jeep, "Box");
|
|
||||||
// box->Width = 1.487f;
|
|
||||||
// box->Height = 0.727f;
|
|
||||||
// box->Depth = 2.594f;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto model = CreateEntity(heli);
|
||||||
{
|
{
|
||||||
auto chassis = CreateEntity(tank);
|
auto transform = AddComponent<Components::Transform>(model, "Transform");
|
||||||
auto transform = AddComponent<Components::Transform>(chassis, "Transform");
|
transform->Orientation = glm::quat(glm::vec3(0, -glm::pi<float>()/2.f, 0.f));
|
||||||
transform->Position = glm::vec3(0, 0, 0);
|
auto modelComponent = AddComponent<Components::Model>(model, "Model");
|
||||||
auto model = AddComponent<Components::Model>(chassis, "Model");
|
modelComponent->ModelFile = "Models/Heli/Chassi/Chassi.obj";
|
||||||
model->ModelFile = "Models/Tank/Fix/Chassi.obj";
|
|
||||||
}
|
}
|
||||||
|
CommitEntity(model);
|
||||||
|
|
||||||
|
auto shape = CreateEntity(heli);
|
||||||
{
|
{
|
||||||
auto tower = CreateEntity(tank);
|
auto transform = AddComponent<Components::Transform>(shape, "Transform");
|
||||||
SetProperty(tower, "Name", "tower");
|
auto box = AddComponent<Components::BoxShape>(shape, "BoxShape");
|
||||||
auto transform = AddComponent<Components::Transform>(tower, "Transform");
|
box->Width = 5.f;
|
||||||
transform->Position = glm::vec3(0.f, 1.2f, 1.8f);
|
box->Height = 1.8f;
|
||||||
auto model = AddComponent<Components::Model>(tower, "Model");
|
box->Depth = 7.f;
|
||||||
model->ModelFile = "Models/Tank/Fix/Top.obj";
|
|
||||||
auto towerSteering = AddComponent<Components::TowerSteering>(tower, "TowerSteering");
|
|
||||||
towerSteering->Axis = glm::vec3(0.f, 1.f, 0.f);
|
|
||||||
towerSteering->TurnSpeed = glm::pi<float>()/4.f;
|
|
||||||
{
|
|
||||||
auto barrel = CreateEntity(tower);
|
|
||||||
auto transform = AddComponent<Components::Transform>(barrel, "Transform");
|
|
||||||
transform->Position = glm::vec3(-0.018f, -0.2, -1.3f);
|
|
||||||
auto model = AddComponent<Components::Model>(barrel, "Model");
|
|
||||||
model->ModelFile = "Models/Tank/Fix/Barrel.obj";
|
|
||||||
auto barrelSteering = AddComponent<Components::BarrelSteering>(barrel, "BarrelSteering");
|
|
||||||
barrelSteering->Axis = glm::vec3(1.f, 0.f, 0.f);
|
|
||||||
barrelSteering->TurnSpeed = glm::pi<float>()/4.f;
|
|
||||||
barrelSteering->ShotSpeed = 70.f;
|
|
||||||
{
|
|
||||||
auto shot = CreateEntity(barrel);
|
|
||||||
auto transform = AddComponent<Components::Transform>(shot, "Transform");
|
|
||||||
transform->Position = glm::vec3(0.35f, 0.f, -2.f);
|
|
||||||
transform->Orientation = glm::angleAxis(-glm::pi<float>()/2.f, glm::vec3(1, 0, 0));
|
|
||||||
transform->Scale = glm::vec3(3.f);
|
|
||||||
AddComponent(shot, "Template");
|
|
||||||
auto physics = AddComponent<Components::Physics>(shot, "Physics");
|
|
||||||
physics->Mass = 10.f;
|
|
||||||
physics->Static = false;
|
|
||||||
auto modelComponent = AddComponent<Components::Model>(shot, "Model");
|
|
||||||
modelComponent->ModelFile = "Models/Placeholders/rocket/Rocket.obj";
|
|
||||||
|
|
||||||
{
|
|
||||||
auto shape = CreateEntity(shot);
|
|
||||||
auto transform = AddComponent<Components::Transform>(shape, "Transform");
|
|
||||||
auto boxShape = AddComponent<Components::BoxShape>(shape, "BoxShape");
|
|
||||||
boxShape->Width = 0.5f;
|
|
||||||
boxShape->Height = 0.5f;
|
|
||||||
boxShape->Depth = 0.5f;
|
|
||||||
CommitEntity(shape);
|
|
||||||
}
|
|
||||||
CommitEntity(shot);
|
|
||||||
barrelSteering->ShotTemplate = shot;
|
|
||||||
}
|
|
||||||
CommitEntity(barrel);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
auto camera = CreateEntity(tower);
|
|
||||||
auto transform = AddComponent<Components::Transform>(camera, "Transform");
|
|
||||||
transform->Position.z = 30.f;
|
|
||||||
transform->Position.y = 5.f;
|
|
||||||
//transform->Orientation = glm::quat(glm::vec3(-glm::pi<float>() / 8.f, 0.f, 0.f));
|
|
||||||
transform->Orientation = glm::angleAxis(glm::pi<float>() / 100, glm::vec3(1, 0, 0));
|
|
||||||
auto cameraComp = AddComponent<Components::Camera>(camera, "Camera");
|
|
||||||
cameraComp->FarClip = 2000.f;
|
|
||||||
AddComponent(camera, "Input");
|
|
||||||
//auto freeSteering = AddComponent<Components::FreeSteering>(camera, "FreeSteering");
|
|
||||||
CommitEntity(camera);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
CommitEntity(shape);
|
||||||
|
|
||||||
{
|
|
||||||
auto lightentity = CreateEntity(tank);
|
|
||||||
auto transform = AddComponent<Components::Transform>(lightentity, "Transform");
|
|
||||||
transform->Position = glm::vec3(0, 0, 0);
|
|
||||||
auto light = AddComponent<Components::PointLight>(lightentity, "PointLight");
|
|
||||||
//light->Diffuse = glm::vec3(128.f/255.f, 172.f/255.f, 242.f/255.f);
|
|
||||||
//light->Specular = glm::vec3(1.f);
|
|
||||||
/*light->ConstantAttenuation = 0.3f;
|
|
||||||
light->LinearAttenuation = 0.003f;
|
|
||||||
light->QuadraticAttenuation = 0.002f;*/
|
|
||||||
}
|
|
||||||
|
|
||||||
// auto wheelpair = CreateEntity(tank);
|
|
||||||
// SetProperty(wheelpair, "Name", "WheelPair");
|
|
||||||
// AddComponent(wheelpair, "WheelPairThingy");
|
|
||||||
|
|
||||||
//Create wheels
|
|
||||||
float wheelOffset = 0.4f;
|
|
||||||
float springLength = 0.3f;
|
|
||||||
float suspensionStrength = 25.f;
|
|
||||||
|
|
||||||
{
|
|
||||||
auto wheel = CreateEntity(tank);
|
|
||||||
auto transform = AddComponent<Components::Transform>(wheel, "Transform");
|
|
||||||
transform->Position = glm::vec3(1.68f, -0.83f - wheelOffset, -2.6f);
|
|
||||||
transform->Orientation = glm::angleAxis(glm::pi<float>(), glm::vec3(0, 1, 0));
|
|
||||||
auto model = AddComponent<Components::Model>(wheel, "Model");
|
|
||||||
model->ModelFile = "Models/Tank/Fix/WheelPhysics.obj";
|
|
||||||
auto Wheel = AddComponent<Components::Wheel>(wheel, "Wheel");
|
|
||||||
Wheel->Hardpoint = transform->Position + glm::vec3(0.f, springLength, 0.f);
|
|
||||||
Wheel->AxleID = 0;
|
|
||||||
Wheel->Mass = 2000;
|
|
||||||
Wheel->Radius = 0.6f;
|
|
||||||
Wheel->Steering = true;
|
|
||||||
Wheel->SuspensionStrength = suspensionStrength;
|
|
||||||
Wheel->Friction = 4.f;
|
|
||||||
Wheel->ConnectedToHandbrake = true;
|
|
||||||
Wheel->TorqueRatio = 0.125f;
|
|
||||||
Wheel->Width = 0.6f;
|
|
||||||
{
|
|
||||||
auto shape = CreateEntity(wheel);
|
|
||||||
auto shapetransform = AddComponent<Components::Transform>(shape, "Transform");
|
|
||||||
shapetransform->Position = glm::vec3(0.f, 0.32f, 0.f) + transform->Position;
|
|
||||||
auto boxShape = AddComponent<Components::BoxShape>(shape, "BoxShape");
|
|
||||||
boxShape->Width = 0.7f;
|
|
||||||
boxShape->Height = 0.34f;
|
|
||||||
boxShape->Depth = 0.7f;
|
|
||||||
CommitEntity(shape);
|
|
||||||
}
|
|
||||||
CommitEntity(wheel);
|
|
||||||
}
|
|
||||||
{
|
|
||||||
auto wheel = CreateEntity(tank);
|
|
||||||
auto transform = AddComponent<Components::Transform>(wheel, "Transform");
|
|
||||||
transform->Position = glm::vec3(1.68f, -0.83f - wheelOffset, -0.83f);
|
|
||||||
transform->Orientation = glm::angleAxis(glm::pi<float>(), glm::vec3(0, 1, 0));
|
|
||||||
auto model = AddComponent<Components::Model>(wheel, "Model");
|
|
||||||
model->ModelFile = "Models/Tank/Fix/WheelPhysics.obj";
|
|
||||||
auto Wheel = AddComponent<Components::Wheel>(wheel, "Wheel");
|
|
||||||
Wheel->Hardpoint = transform->Position + glm::vec3(0.f, springLength, 0.f);
|
|
||||||
Wheel->AxleID = 0;
|
|
||||||
Wheel->Mass = 2000;
|
|
||||||
Wheel->Radius = 0.6f;
|
|
||||||
Wheel->Steering = false;
|
|
||||||
Wheel->SuspensionStrength = suspensionStrength;
|
|
||||||
Wheel->Friction = 4.f;
|
|
||||||
Wheel->ConnectedToHandbrake = true;
|
|
||||||
Wheel->TorqueRatio = 0.125f;
|
|
||||||
Wheel->Width = 0.6f;
|
|
||||||
{
|
|
||||||
auto shape = CreateEntity(wheel);
|
|
||||||
auto shapetransform = AddComponent<Components::Transform>(shape, "Transform");
|
|
||||||
shapetransform->Position = glm::vec3(0.f, 0.32f, 0.f) + transform->Position;
|
|
||||||
auto boxShape = AddComponent<Components::BoxShape>(shape, "BoxShape");
|
|
||||||
boxShape->Width = 0.7f;
|
|
||||||
boxShape->Height = 0.34f;
|
|
||||||
boxShape->Depth = 0.7f;
|
|
||||||
CommitEntity(shape);
|
|
||||||
}
|
|
||||||
CommitEntity(wheel);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
auto wheel = CreateEntity(tank);
|
|
||||||
auto transform = AddComponent<Components::Transform>(wheel, "Transform");
|
|
||||||
transform->Position = glm::vec3(-1.68f, -0.83f - wheelOffset, -2.6f);
|
|
||||||
transform->Orientation = glm::angleAxis(glm::pi<float>(), glm::vec3(0, 1, 0));
|
|
||||||
auto model = AddComponent<Components::Model>(wheel, "Model");
|
|
||||||
model->ModelFile = "Models/Tank/Fix/WheelPhysics.obj";
|
|
||||||
auto Wheel = AddComponent<Components::Wheel>(wheel, "Wheel");
|
|
||||||
Wheel->Hardpoint = transform->Position + glm::vec3(0.f, springLength, 0.f);
|
|
||||||
Wheel->AxleID = 0;
|
|
||||||
Wheel->Mass = 2000;
|
|
||||||
Wheel->Radius = 0.6f;
|
|
||||||
Wheel->Steering = true;
|
|
||||||
Wheel->SuspensionStrength = suspensionStrength;
|
|
||||||
Wheel->Friction = 4.f;
|
|
||||||
Wheel->ConnectedToHandbrake = true;
|
|
||||||
Wheel->TorqueRatio = 0.125f;
|
|
||||||
Wheel->Width = 0.6f;
|
|
||||||
{
|
|
||||||
auto shape = CreateEntity(wheel);
|
|
||||||
auto shapetransform = AddComponent<Components::Transform>(shape, "Transform");
|
|
||||||
shapetransform->Position = glm::vec3(0.f, 0.32f, 0.f) + transform->Position;
|
|
||||||
auto boxShape = AddComponent<Components::BoxShape>(shape, "BoxShape");
|
|
||||||
boxShape->Width = 0.7f;
|
|
||||||
boxShape->Height = 0.34f;
|
|
||||||
boxShape->Depth = 0.7f;
|
|
||||||
CommitEntity(shape);
|
|
||||||
}
|
|
||||||
CommitEntity(wheel);
|
|
||||||
}
|
|
||||||
{
|
|
||||||
auto wheel = CreateEntity(tank);
|
|
||||||
auto transform = AddComponent<Components::Transform>(wheel, "Transform");
|
|
||||||
transform->Position = glm::vec3(-1.68f, -0.83f - wheelOffset, -0.83f);
|
|
||||||
transform->Orientation = glm::angleAxis(glm::pi<float>(), glm::vec3(0, 1, 0));
|
|
||||||
auto model = AddComponent<Components::Model>(wheel, "Model");
|
|
||||||
model->ModelFile = "Models/Tank/Fix/WheelPhysics.obj";
|
|
||||||
auto Wheel = AddComponent<Components::Wheel>(wheel, "Wheel");
|
|
||||||
Wheel->Hardpoint = transform->Position + glm::vec3(0.f, springLength, 0.f);
|
|
||||||
Wheel->AxleID = 0;
|
|
||||||
Wheel->Mass = 2000;
|
|
||||||
Wheel->Radius = 0.6f;
|
|
||||||
Wheel->Steering = false;
|
|
||||||
Wheel->SuspensionStrength = suspensionStrength;
|
|
||||||
Wheel->Friction = 4.f;
|
|
||||||
Wheel->ConnectedToHandbrake = true;
|
|
||||||
Wheel->TorqueRatio = 0.125f;
|
|
||||||
Wheel->Width = 0.6f;
|
|
||||||
{
|
|
||||||
auto shape = CreateEntity(wheel);
|
|
||||||
auto shapetransform = AddComponent<Components::Transform>(shape, "Transform");
|
|
||||||
shapetransform->Position = glm::vec3(0.f, 0.32f, 0.f) + transform->Position;
|
|
||||||
auto boxShape = AddComponent<Components::BoxShape>(shape, "BoxShape");
|
|
||||||
boxShape->Width = 0.7f;
|
|
||||||
boxShape->Height = 0.34f;
|
|
||||||
boxShape->Depth = 0.7f;
|
|
||||||
CommitEntity(shape);
|
|
||||||
}
|
|
||||||
CommitEntity(wheel);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//Back
|
|
||||||
{
|
|
||||||
auto wheel = CreateEntity(tank);
|
|
||||||
auto transform = AddComponent<Components::Transform>(wheel, "Transform");
|
|
||||||
transform->Position = glm::vec3(1.68f, -0.83f - wheelOffset, 1.f);
|
|
||||||
auto model = AddComponent<Components::Model>(wheel, "Model");
|
|
||||||
model->ModelFile = "Models/Tank/Fix/WheelPhysics.obj";
|
|
||||||
auto Wheel = AddComponent<Components::Wheel>(wheel, "Wheel");
|
|
||||||
Wheel->Hardpoint = transform->Position + glm::vec3(0.f, springLength, 0.f);
|
|
||||||
Wheel->AxleID = 1;
|
|
||||||
Wheel->Mass = 2000;
|
|
||||||
Wheel->Radius = 0.6f;
|
|
||||||
Wheel->Steering = false;
|
|
||||||
Wheel->SuspensionStrength = suspensionStrength;
|
|
||||||
Wheel->Friction = 4.f;
|
|
||||||
Wheel->ConnectedToHandbrake = true;
|
|
||||||
Wheel->TorqueRatio = 0.125f;
|
|
||||||
Wheel->Width = 0.6f;
|
|
||||||
{
|
|
||||||
auto shape = CreateEntity(wheel);
|
|
||||||
auto shapetransform = AddComponent<Components::Transform>(shape, "Transform");
|
|
||||||
shapetransform->Position = glm::vec3(0.f, 0.32f, 0.f) + transform->Position;
|
|
||||||
auto boxShape = AddComponent<Components::BoxShape>(shape, "BoxShape");
|
|
||||||
boxShape->Width = 0.7f;
|
|
||||||
boxShape->Height = 0.34f;
|
|
||||||
boxShape->Depth = 0.7f;
|
|
||||||
CommitEntity(shape);
|
|
||||||
}
|
|
||||||
CommitEntity(wheel);
|
|
||||||
}
|
|
||||||
{
|
|
||||||
auto wheel = CreateEntity(tank);
|
|
||||||
auto transform = AddComponent<Components::Transform>(wheel, "Transform");
|
|
||||||
transform->Position = glm::vec3(1.68f, -0.83f - wheelOffset, 2.95f);
|
|
||||||
auto model = AddComponent<Components::Model>(wheel, "Model");
|
|
||||||
model->ModelFile = "Models/Tank/Fix/WheelPhysics.obj";
|
|
||||||
auto Wheel = AddComponent<Components::Wheel>(wheel, "Wheel");
|
|
||||||
Wheel->Hardpoint = transform->Position + glm::vec3(0.f, springLength, 0.f);
|
|
||||||
Wheel->AxleID = 1;
|
|
||||||
Wheel->Mass = 2000;
|
|
||||||
Wheel->Radius = 0.6f;
|
|
||||||
Wheel->Steering = false;
|
|
||||||
Wheel->SuspensionStrength = suspensionStrength;
|
|
||||||
Wheel->Friction = 4.f;
|
|
||||||
Wheel->ConnectedToHandbrake = true;
|
|
||||||
Wheel->TorqueRatio = 0.125f;
|
|
||||||
Wheel->Width = 0.6f;
|
|
||||||
{
|
|
||||||
auto shape = CreateEntity(wheel);
|
|
||||||
auto shapetransform = AddComponent<Components::Transform>(shape, "Transform");
|
|
||||||
shapetransform->Position = glm::vec3(0.f, 0.32f, 0.f) + transform->Position;
|
|
||||||
auto boxShape = AddComponent<Components::BoxShape>(shape, "BoxShape");
|
|
||||||
boxShape->Width = 0.7f;
|
|
||||||
boxShape->Height = 0.34f;
|
|
||||||
boxShape->Depth = 0.7f;
|
|
||||||
CommitEntity(shape);
|
|
||||||
}
|
|
||||||
CommitEntity(wheel);
|
|
||||||
|
|
||||||
auto entity = CreateEntity(tank);
|
|
||||||
auto transformComponent = AddComponent<Components::Transform>(entity, "Transform");
|
|
||||||
transformComponent->Position = glm::vec3(2,-1.7,2.0);
|
|
||||||
transformComponent->Scale = glm::vec3(3,3,3);
|
|
||||||
transformComponent->Orientation = glm::angleAxis(glm::pi<float>()/2, glm::vec3(1,0,0));
|
|
||||||
auto emitterComponent = AddComponent<Components::ParticleEmitter>(entity, "ParticleEmitter");
|
|
||||||
emitterComponent->SpawnCount = 2;
|
|
||||||
emitterComponent->SpawnFrequency = 0.005;
|
|
||||||
emitterComponent->SpreadAngle = glm::pi<float>();
|
|
||||||
emitterComponent->UseGoalVelocity = false;
|
|
||||||
emitterComponent->LifeTime = 0.5;
|
|
||||||
//emitterComponent->AngularVelocitySpectrum.push_back(glm::pi<float>() / 100);
|
|
||||||
emitterComponent->ScaleSpectrum.push_back(glm::vec3(0.05));
|
|
||||||
CommitEntity(entity);
|
|
||||||
|
|
||||||
auto particleEntity = CreateEntity(entity);
|
|
||||||
auto TEMP = AddComponent<Components::Transform>(particleEntity, "Transform");
|
|
||||||
TEMP->Scale = glm::vec3(0);
|
|
||||||
auto spriteComponent = AddComponent<Components::Sprite>(particleEntity, "Sprite");
|
|
||||||
spriteComponent->SpriteFile = "Models/Textures/Sprites/Dust.png";
|
|
||||||
emitterComponent->ParticleTemplate = particleEntity;
|
|
||||||
|
|
||||||
CommitEntity(particleEntity);
|
|
||||||
}
|
|
||||||
|
|
||||||
{
|
|
||||||
auto wheel = CreateEntity(tank);
|
|
||||||
auto transform = AddComponent<Components::Transform>(wheel, "Transform");
|
|
||||||
transform->Position = glm::vec3(-1.68f, -0.83f - wheelOffset, 1.f);
|
|
||||||
transform->Orientation = glm::angleAxis(glm::pi<float>(), glm::vec3(0, 1, 0));
|
|
||||||
auto model = AddComponent<Components::Model>(wheel, "Model");
|
|
||||||
model->ModelFile = "Models/Tank/Fix/WheelPhysics.obj";
|
|
||||||
auto Wheel = AddComponent<Components::Wheel>(wheel, "Wheel");
|
|
||||||
Wheel->Hardpoint = transform->Position + glm::vec3(0.f, springLength, 0.f);
|
|
||||||
Wheel->AxleID = 1;
|
|
||||||
Wheel->Mass = 2000;
|
|
||||||
Wheel->Radius = 0.6f;
|
|
||||||
Wheel->Steering = false;
|
|
||||||
Wheel->SuspensionStrength = suspensionStrength;
|
|
||||||
Wheel->Friction = 4.f;
|
|
||||||
Wheel->ConnectedToHandbrake = true;
|
|
||||||
Wheel->TorqueRatio = 0.125f;
|
|
||||||
Wheel->Width = 0.6f;
|
|
||||||
{
|
|
||||||
auto shape = CreateEntity(wheel);
|
|
||||||
auto shapetransform = AddComponent<Components::Transform>(shape, "Transform");
|
|
||||||
shapetransform->Position = glm::vec3(0.f, 0.32f, 0.f) + transform->Position;
|
|
||||||
auto boxShape = AddComponent<Components::BoxShape>(shape, "BoxShape");
|
|
||||||
boxShape->Width = 0.7f;
|
|
||||||
boxShape->Height = 0.34f;
|
|
||||||
boxShape->Depth = 0.7f;
|
|
||||||
CommitEntity(shape);
|
|
||||||
}
|
|
||||||
CommitEntity(wheel);
|
|
||||||
}
|
|
||||||
{
|
|
||||||
auto wheel = CreateEntity(tank);
|
|
||||||
auto transform = AddComponent<Components::Transform>(wheel, "Transform");
|
|
||||||
transform->Position = glm::vec3(-1.68f, -0.83f - wheelOffset, 2.95f);
|
|
||||||
auto model = AddComponent<Components::Model>(wheel, "Model");
|
|
||||||
model->ModelFile = "Models/Tank/Fix/WheelPhysics.obj";
|
|
||||||
auto Wheel = AddComponent<Components::Wheel>(wheel, "Wheel");
|
|
||||||
Wheel->Hardpoint = transform->Position + glm::vec3(0.f, springLength, 0.f);
|
|
||||||
Wheel->AxleID = 1;
|
|
||||||
Wheel->Mass = 2000;
|
|
||||||
Wheel->Radius = 0.6f;
|
|
||||||
Wheel->Steering = false;
|
|
||||||
Wheel->SuspensionStrength = suspensionStrength;
|
|
||||||
Wheel->Friction = 4.f;
|
|
||||||
Wheel->ConnectedToHandbrake = true;
|
|
||||||
Wheel->TorqueRatio = 0.125f;
|
|
||||||
Wheel->Width = 0.6f;
|
|
||||||
{
|
|
||||||
auto shape = CreateEntity(wheel);
|
|
||||||
auto shapetransform = AddComponent<Components::Transform>(shape, "Transform");
|
|
||||||
shapetransform->Position = glm::vec3(0.f, 0.32f, 0.f) + transform->Position;
|
|
||||||
auto boxShape = AddComponent<Components::BoxShape>(shape, "BoxShape");
|
|
||||||
boxShape->Width = 0.7f;
|
|
||||||
boxShape->Height = 0.34f;
|
|
||||||
boxShape->Depth = 0.7f;
|
|
||||||
CommitEntity(shape);
|
|
||||||
}
|
|
||||||
CommitEntity(wheel);
|
|
||||||
|
|
||||||
auto entity = CreateEntity(tank);
|
|
||||||
auto transformComponent = AddComponent<Components::Transform>(entity, "Transform");
|
|
||||||
transformComponent->Position = glm::vec3(-2,-1.7,2.0);
|
|
||||||
transformComponent->Scale = glm::vec3(3,3,3);
|
|
||||||
transformComponent->Orientation = glm::angleAxis(glm::pi<float>()/2, glm::vec3(1,0,0));
|
|
||||||
auto emitterComponent = AddComponent<Components::ParticleEmitter>(entity, "ParticleEmitter");
|
|
||||||
emitterComponent->SpawnCount = 2;
|
|
||||||
emitterComponent->SpawnFrequency = 0.005;
|
|
||||||
emitterComponent->SpreadAngle = glm::pi<float>();
|
|
||||||
emitterComponent->UseGoalVelocity = false;
|
|
||||||
emitterComponent->LifeTime = 0.5;
|
|
||||||
//emitterComponent->AngularVelocitySpectrum.push_back(glm::pi<float>() / 100);
|
|
||||||
emitterComponent->ScaleSpectrum.push_back(glm::vec3(0.05));
|
|
||||||
CommitEntity(entity);
|
|
||||||
|
|
||||||
auto particleEntity = CreateEntity(entity);
|
|
||||||
auto TEMP = AddComponent<Components::Transform>(particleEntity, "Transform");
|
|
||||||
TEMP->Scale = glm::vec3(0);
|
|
||||||
auto spriteComponent = AddComponent<Components::Sprite>(particleEntity, "Sprite");
|
|
||||||
spriteComponent->SpriteFile = "Models/Textures/Sprites/Dust.png";
|
|
||||||
emitterComponent->ParticleTemplate = particleEntity;
|
|
||||||
|
|
||||||
CommitEntity(particleEntity);
|
|
||||||
}
|
|
||||||
|
|
||||||
CommitEntity(tank);
|
|
||||||
}
|
}
|
||||||
|
CommitEntity(heli);
|
||||||
|
|
||||||
|
auto camera = CreateEntity(heli);
|
||||||
|
|
||||||
/*
|
|
||||||
for(int i = 0; i < 10; i++)
|
|
||||||
{
|
|
||||||
auto entity = CreateEntity();
|
|
||||||
auto transform = AddComponent<Components::Transform>(entity, "Transform");
|
|
||||||
transform->Position = glm::vec3(30 + i*0.1f, 0 + i*0.1f, 10 + i*0.1f);
|
|
||||||
transform->Scale = glm::vec3(0);
|
|
||||||
transform->Orientation = glm::quat(glm::vec3(0.0f, 0.0f, 0.0f));
|
|
||||||
|
|
||||||
std::stringstream ss;
|
|
||||||
ss << "Models/Placeholders/ShatterTest/" << i+1 << ".obj";
|
|
||||||
|
|
||||||
auto model = AddComponent<Components::Model>(entity, "Model");
|
|
||||||
model->ModelFile = ss.str();
|
|
||||||
|
|
||||||
auto physics = AddComponent<Components::Physics>(entity, "Physics");
|
|
||||||
physics->Mass = 100;
|
|
||||||
physics->Static = true;
|
|
||||||
auto meshShape = AddComponent<Components::MeshShape>(entity, "MeshShape");
|
|
||||||
meshShape->ResourceName = ss.str();
|
|
||||||
|
|
||||||
CommitEntity(entity);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
for(int i = 0; i < 1; i++)
|
|
||||||
{
|
{
|
||||||
for (int y = 0; y < 15; y++)
|
auto transform = AddComponent<Components::Transform>(camera, "Transform");
|
||||||
{
|
transform->Position.z = 10.f;
|
||||||
for (int x = -5; x < 5; x++)
|
transform->Position.y = 5.f;
|
||||||
{
|
//transform->Orientation = glm::quat(glm::vec3(glm::pi<float>() / 8.f, 0.f, 0.f));
|
||||||
auto brick = CreateEntity();
|
auto cameraComp = AddComponent<Components::Camera>(camera, "Camera");
|
||||||
auto transform = AddComponent<Components::Transform>(brick, "Transform");
|
cameraComp->FarClip = 2000.f;
|
||||||
transform->Position = glm::vec3(x + 0.01f, y * 0.3f + 0.01f, -20);
|
auto freeSteering = AddComponent<Components::FreeSteering>(camera, "FreeSteering");
|
||||||
transform->Position.x += (y % 2)*0.5f;
|
CommitEntity(camera);
|
||||||
transform->Scale = glm::vec3(1, 0.3f, 0.4f);
|
|
||||||
transform->Orientation = glm::quat(glm::vec3(0.0f, 0.0f, 0.0f));
|
|
||||||
auto model = AddComponent<Components::Model>(brick, "Model");
|
|
||||||
model->ModelFile = "Models/Placeholders/PhysicsTest/Cube2.obj";
|
|
||||||
|
|
||||||
auto physics = AddComponent<Components::Physics>(brick, "Physics");
|
|
||||||
physics->Mass = 3;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
auto shape = CreateEntity(brick);
|
|
||||||
auto transformshape = AddComponent<Components::Transform>(shape, "Transform");
|
|
||||||
auto box = AddComponent<Components::BoxShape>(shape, "BoxShape");
|
|
||||||
box->Width = 0.5f;
|
|
||||||
box->Height = 0.15f;
|
|
||||||
box->Depth = 0.3f;
|
|
||||||
CommitEntity(shape);
|
|
||||||
CommitEntity(brick);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*for (int x = 0; x < 5; x++)
|
|
||||||
for (int y = 0; y < 5; y++)
|
|
||||||
{
|
|
||||||
auto cube = CreateEntity();
|
|
||||||
auto transform = AddComponent<Components::Transform>(cube, "Transform");
|
|
||||||
transform->Position = glm::vec3(3 * x + 0.1f + -20.f, 3 * y + 0.1f + 1.f, 0);
|
|
||||||
transform->Scale = glm::vec3(3);
|
|
||||||
transform->Orientation = glm::quat(glm::vec3(0.0f, 0.0f, 0.0f));
|
|
||||||
auto model = AddComponent<Components::Model>(cube, "Model");
|
|
||||||
model->ModelFile = "Models/Placeholders/PhysicsTest/Cube2.obj";
|
|
||||||
|
|
||||||
auto physics = AddComponent<Components::Physics>(cube, "Physics");
|
|
||||||
physics->Mass = 100;
|
|
||||||
auto box = AddComponent<Components::BoxShape>(cube, "BoxShape");
|
|
||||||
box->Width = 1.5f;
|
|
||||||
box->Height = 1.5f;
|
|
||||||
box->Depth = 1.5f;
|
|
||||||
CommitEntity(cube);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/*{
|
|
||||||
auto entity = CreateEntity();
|
|
||||||
AddComponent(entity, "Transform");
|
|
||||||
auto emitter = AddComponent<Components::SoundEmitter>(entity, "SoundEmitter");
|
|
||||||
emitter->Path = "Sounds/korvring.wav";
|
|
||||||
emitter->Loop = true;
|
|
||||||
GetSystem<Systems::SoundSystem>("SoundSystem")->PlaySound(emitter);
|
|
||||||
CommitEntity(entity);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameWorld::Update(double dt)
|
void GameWorld::Update(double dt)
|
||||||
@@ -742,6 +151,7 @@ void GameWorld::RegisterSystems()
|
|||||||
//m_SystemFactory.Register("PlayerSystem", [this]() { return new Systems::PlayerSystem(this); });
|
//m_SystemFactory.Register("PlayerSystem", [this]() { return new Systems::PlayerSystem(this); });
|
||||||
m_SystemFactory.Register("FreeSteeringSystem", [this]() { return new Systems::FreeSteeringSystem(this, m_EventBroker); });
|
m_SystemFactory.Register("FreeSteeringSystem", [this]() { return new Systems::FreeSteeringSystem(this, m_EventBroker); });
|
||||||
m_SystemFactory.Register("TankSteeringSystem", [this]() { return new Systems::TankSteeringSystem(this, m_EventBroker); });
|
m_SystemFactory.Register("TankSteeringSystem", [this]() { return new Systems::TankSteeringSystem(this, m_EventBroker); });
|
||||||
|
m_SystemFactory.Register("HelicopterSteeringSystem", [this]() { return new Systems::HelicopterSteeringSystem(this, m_EventBroker); });
|
||||||
m_SystemFactory.Register("SoundSystem", [this]() { return new Systems::SoundSystem(this, m_EventBroker); });
|
m_SystemFactory.Register("SoundSystem", [this]() { return new Systems::SoundSystem(this, m_EventBroker); });
|
||||||
m_SystemFactory.Register("PhysicsSystem", [this]() { return new Systems::PhysicsSystem(this, m_EventBroker); });
|
m_SystemFactory.Register("PhysicsSystem", [this]() { return new Systems::PhysicsSystem(this, m_EventBroker); });
|
||||||
m_SystemFactory.Register("RenderSystem", [this]() { return new Systems::RenderSystem(this, m_EventBroker, m_Renderer); });
|
m_SystemFactory.Register("RenderSystem", [this]() { return new Systems::RenderSystem(this, m_EventBroker, m_Renderer); });
|
||||||
@@ -758,6 +168,7 @@ void GameWorld::AddSystems()
|
|||||||
//AddSystem("PlayerSystem");
|
//AddSystem("PlayerSystem");
|
||||||
AddSystem("FreeSteeringSystem");
|
AddSystem("FreeSteeringSystem");
|
||||||
AddSystem("TankSteeringSystem");
|
AddSystem("TankSteeringSystem");
|
||||||
|
AddSystem("HelicopterSteeringSystem");
|
||||||
AddSystem("SoundSystem");
|
AddSystem("SoundSystem");
|
||||||
AddSystem("PhysicsSystem");
|
AddSystem("PhysicsSystem");
|
||||||
AddSystem("RenderSystem");
|
AddSystem("RenderSystem");
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
//#include "Systems/PlayerSystem.h"
|
//#include "Systems/PlayerSystem.h"
|
||||||
#include "Systems/FreeSteeringSystem.h"
|
#include "Systems/FreeSteeringSystem.h"
|
||||||
#include "Systems/TankSteeringSystem.h"
|
#include "Systems/TankSteeringSystem.h"
|
||||||
|
#include "Systems/HelicopterSteeringSystem.h"
|
||||||
#include "Systems/RenderSystem.h"
|
#include "Systems/RenderSystem.h"
|
||||||
#include "Systems/SoundSystem.h"
|
#include "Systems/SoundSystem.h"
|
||||||
#include "Systems/PhysicsSystem.h"
|
#include "Systems/PhysicsSystem.h"
|
||||||
|
|||||||
@@ -60,27 +60,27 @@ void Systems::FreeSteeringSystem::UpdateEntity(double dt, EntityID entity, Entit
|
|||||||
bool Systems::FreeSteeringSystem::FreeSteeringInputController::OnCommand(const Events::InputCommand &event)
|
bool Systems::FreeSteeringSystem::FreeSteeringInputController::OnCommand(const Events::InputCommand &event)
|
||||||
{
|
{
|
||||||
// Movement
|
// Movement
|
||||||
if (event.Command == "vertical")
|
if (event.Command == "cam_vertical")
|
||||||
{
|
{
|
||||||
Movement.z = -event.Value;
|
Movement.z = -event.Value;
|
||||||
}
|
}
|
||||||
else if (event.Command == "horizontal")
|
else if (event.Command == "cam_horizontal")
|
||||||
{
|
{
|
||||||
Movement.x = event.Value;
|
Movement.x = event.Value;
|
||||||
}
|
}
|
||||||
else if (event.Command == "normal")
|
else if (event.Command == "cam_normal")
|
||||||
{
|
{
|
||||||
Movement.y = event.Value;
|
Movement.y = event.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Speed
|
// Speed
|
||||||
else if (event.Command == "speed")
|
else if (event.Command == "cam_speed")
|
||||||
{
|
{
|
||||||
SpeedMultiplier = event.Value;
|
SpeedMultiplier = event.Value;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mouse click
|
// Mouse click
|
||||||
else if (event.Command == "attack")
|
else if (event.Command == "cam_attack")
|
||||||
{
|
{
|
||||||
OrientationActive = event.Value > 0;
|
OrientationActive = event.Value > 0;
|
||||||
|
|
||||||
@@ -96,11 +96,11 @@ bool Systems::FreeSteeringSystem::FreeSteeringInputController::OnCommand(const E
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
else if (event.Command == "vertical2")
|
else if (event.Command == "cam_vertical2")
|
||||||
{
|
{
|
||||||
ControllerOrientation.x = event.Value;
|
ControllerOrientation.x = event.Value;
|
||||||
}
|
}
|
||||||
else if (event.Command == "horizontal2")
|
else if (event.Command == "cam_horizontal2")
|
||||||
{
|
{
|
||||||
ControllerOrientation.y = -event.Value;
|
ControllerOrientation.y = -event.Value;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,67 @@
|
|||||||
|
#include "PrecompiledHeader.h"
|
||||||
|
#include "HelicopterSteeringSystem.h"
|
||||||
|
#include "World.h"
|
||||||
|
|
||||||
|
void Systems::HelicopterSteeringSystem::RegisterComponents(ComponentFactory* cf)
|
||||||
|
{
|
||||||
|
cf->Register("HelicopterSteering", []() { return new Components::HelicopterSteering(); });
|
||||||
|
}
|
||||||
|
|
||||||
|
void Systems::HelicopterSteeringSystem::Initialize()
|
||||||
|
{
|
||||||
|
m_InputController = std::unique_ptr<HelicopterSteeringInputController>(new HelicopterSteeringInputController(EventBroker));
|
||||||
|
}
|
||||||
|
|
||||||
|
void Systems::HelicopterSteeringSystem::Update(double dt)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
void Systems::HelicopterSteeringSystem::UpdateEntity(double dt, EntityID entity, EntityID parent)
|
||||||
|
{
|
||||||
|
auto transform = m_World->GetComponent<Components::Transform>(entity, "Transform");
|
||||||
|
if (!transform)
|
||||||
|
return;
|
||||||
|
|
||||||
|
auto helicopterComponent = m_World->GetComponent<Components::HelicopterSteering>(entity, "HelicopterSteering");
|
||||||
|
if (helicopterComponent)
|
||||||
|
{
|
||||||
|
glm::vec3 controllerRotationEuler = m_InputController->Rotation * (float)dt;
|
||||||
|
transform->Orientation *= glm::quat(controllerRotationEuler);
|
||||||
|
|
||||||
|
Events::ApplyForce e;
|
||||||
|
e.Entity = entity;
|
||||||
|
e.DeltaTime = dt;
|
||||||
|
e.Force = glm::normalize(transform->Orientation * glm::vec3(0, 1, 0)) * (m_InputController->Power * 3000.f * 9.82f * 8.f);
|
||||||
|
EventBroker->Publish(e);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Systems::HelicopterSteeringSystem::HelicopterSteeringInputController::OnCommand(const Events::InputCommand &event)
|
||||||
|
{
|
||||||
|
if (event.Command == "horizontal")
|
||||||
|
{
|
||||||
|
Rotation.z = -event.Value;
|
||||||
|
}
|
||||||
|
else if (event.Command == "vertical")
|
||||||
|
{
|
||||||
|
Rotation.x = -event.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
else if (event.Command == "normal")
|
||||||
|
{
|
||||||
|
Power = event.Value;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Systems::HelicopterSteeringSystem::HelicopterSteeringInputController::OnMouseMove(const Events::MouseMove &event)
|
||||||
|
{
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Systems::HelicopterSteeringSystem::HelicopterSteeringInputController::Update(double dt)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
#include "System.h"
|
||||||
|
#include "Components/Transform.h"
|
||||||
|
#include "Components/HelicopterSteering.h"
|
||||||
|
#include "Events/SetVelocity.h"
|
||||||
|
#include "Events/ApplyForce.h"
|
||||||
|
#include "InputController.h"
|
||||||
|
|
||||||
|
namespace Systems
|
||||||
|
{
|
||||||
|
|
||||||
|
class HelicopterSteeringSystem : public System
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
HelicopterSteeringSystem(World* world, std::shared_ptr<::EventBroker> eventBroker)
|
||||||
|
: System(world, eventBroker) { }
|
||||||
|
|
||||||
|
void RegisterComponents(ComponentFactory* cf) override;
|
||||||
|
void Initialize() override;
|
||||||
|
|
||||||
|
void Update(double dt) override;
|
||||||
|
void UpdateEntity(double dt, EntityID entity, EntityID parent) override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
class HelicopterSteeringInputController;
|
||||||
|
std::unique_ptr<HelicopterSteeringInputController> m_InputController;
|
||||||
|
|
||||||
|
std::map<EntityID, double> m_TimeSinceLastShot;
|
||||||
|
};
|
||||||
|
|
||||||
|
class HelicopterSteeringSystem::HelicopterSteeringInputController : InputController
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
HelicopterSteeringInputController(std::shared_ptr<::EventBroker> eventBroker)
|
||||||
|
: InputController(eventBroker)
|
||||||
|
, Power(0.f)
|
||||||
|
{ }
|
||||||
|
|
||||||
|
float Power;
|
||||||
|
glm::vec3 Rotation;
|
||||||
|
|
||||||
|
void Update(double dt);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
bool OnCommand(const Events::InputCommand &event) override;
|
||||||
|
bool OnMouseMove(const Events::MouseMove &event) override;
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -32,6 +32,7 @@ void Systems::PhysicsSystem::Initialize()
|
|||||||
// Events
|
// Events
|
||||||
EVENT_SUBSCRIBE_MEMBER(m_ETankSteer, &Systems::PhysicsSystem::OnTankSteer);
|
EVENT_SUBSCRIBE_MEMBER(m_ETankSteer, &Systems::PhysicsSystem::OnTankSteer);
|
||||||
EVENT_SUBSCRIBE_MEMBER(m_ESetVelocity, &Systems::PhysicsSystem::OnSetVelocity);
|
EVENT_SUBSCRIBE_MEMBER(m_ESetVelocity, &Systems::PhysicsSystem::OnSetVelocity);
|
||||||
|
EVENT_SUBSCRIBE_MEMBER(m_EApplyForce, &Systems::PhysicsSystem::OnApplyForce);
|
||||||
|
|
||||||
hkMemorySystem::FrameInfo finfo(6000 * 1024); // Allocate 6MB of Physics solver buffer
|
hkMemorySystem::FrameInfo finfo(6000 * 1024); // Allocate 6MB of Physics solver buffer
|
||||||
hkMemoryRouter* memoryRouter = hkMemoryInitUtil::initDefault(hkMallocAllocator::m_defaultMallocAllocator, finfo);
|
hkMemoryRouter* memoryRouter = hkMemoryInitUtil::initDefault(hkMallocAllocator::m_defaultMallocAllocator, finfo);
|
||||||
@@ -160,7 +161,7 @@ void Systems::PhysicsSystem::Update(double dt)
|
|||||||
m_Accumulator += dt;
|
m_Accumulator += dt;
|
||||||
while (m_Accumulator >= timestep)
|
while (m_Accumulator >= timestep)
|
||||||
{
|
{
|
||||||
m_PhysicsWorld->stepMultithreaded(m_JobQueue, m_ThreadPool, timestep);
|
hkpStepResult stepresult = m_PhysicsWorld->stepMultithreaded(m_JobQueue, m_ThreadPool, timestep);
|
||||||
//m_PhysicsWorld->stepDeltaTime(timestep);
|
//m_PhysicsWorld->stepDeltaTime(timestep);
|
||||||
|
|
||||||
m_Accumulator -= timestep;
|
m_Accumulator -= timestep;
|
||||||
@@ -172,10 +173,7 @@ void Systems::PhysicsSystem::Update(double dt)
|
|||||||
// Clear accumulated timer data in this thread and all slave threads
|
// Clear accumulated timer data in this thread and all slave threads
|
||||||
hkMonitorStream::getInstance().reset();
|
hkMonitorStream::getInstance().reset();
|
||||||
m_ThreadPool->clearTimerData();
|
m_ThreadPool->clearTimerData();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Systems::PhysicsSystem::UpdateEntity(double dt, EntityID entity, EntityID parent)
|
void Systems::PhysicsSystem::UpdateEntity(double dt, EntityID entity, EntityID parent)
|
||||||
@@ -586,5 +584,15 @@ bool Systems::PhysicsSystem::OnSetVelocity( const Events::SetVelocity &event )
|
|||||||
m_PhysicsWorld->markForWrite();
|
m_PhysicsWorld->markForWrite();
|
||||||
m_RigidBodies[event.Entity]->setLinearVelocity(ConvertPosition(event.Velocity));
|
m_RigidBodies[event.Entity]->setLinearVelocity(ConvertPosition(event.Velocity));
|
||||||
m_PhysicsWorld->unmarkForWrite();
|
m_PhysicsWorld->unmarkForWrite();
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Systems::PhysicsSystem::OnApplyForce(const Events::ApplyForce &event)
|
||||||
|
{
|
||||||
|
m_PhysicsWorld->markForWrite();
|
||||||
|
m_RigidBodies[event.Entity]->applyForce(event.DeltaTime, ConvertPosition(event.Force));
|
||||||
|
m_PhysicsWorld->unmarkForWrite();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@
|
|||||||
#include "Components/TowerSteering.h"
|
#include "Components/TowerSteering.h"
|
||||||
#include "Events/TankSteer.h"
|
#include "Events/TankSteer.h"
|
||||||
#include "Events/SetVelocity.h"
|
#include "Events/SetVelocity.h"
|
||||||
|
#include "Events/ApplyForce.h"
|
||||||
#include "OBJ.h"
|
#include "OBJ.h"
|
||||||
|
|
||||||
// Math and base include
|
// Math and base include
|
||||||
@@ -85,9 +86,10 @@ private:
|
|||||||
// Events
|
// Events
|
||||||
EventRelay<Events::TankSteer> m_ETankSteer;
|
EventRelay<Events::TankSteer> m_ETankSteer;
|
||||||
bool OnTankSteer(const Events::TankSteer &event);
|
bool OnTankSteer(const Events::TankSteer &event);
|
||||||
|
|
||||||
EventRelay<Events::SetVelocity> m_ESetVelocity;
|
EventRelay<Events::SetVelocity> m_ESetVelocity;
|
||||||
bool OnSetVelocity(const Events::SetVelocity &event);
|
bool OnSetVelocity(const Events::SetVelocity &event);
|
||||||
|
EventRelay<Events::ApplyForce> m_EApplyForce;
|
||||||
|
bool OnApplyForce(const Events::ApplyForce &event);
|
||||||
|
|
||||||
void SetUpPhysicsState(EntityID entity, EntityID parent);
|
void SetUpPhysicsState(EntityID entity, EntityID parent);
|
||||||
void TearDownPhysicsState(EntityID entity, EntityID parent);
|
void TearDownPhysicsState(EntityID entity, EntityID parent);
|
||||||
|
|||||||
@@ -111,6 +111,7 @@
|
|||||||
<ClCompile Include="..\..\src\Sound.cpp" />
|
<ClCompile Include="..\..\src\Sound.cpp" />
|
||||||
<ClCompile Include="..\..\src\Systems\DebugSystem.cpp" />
|
<ClCompile Include="..\..\src\Systems\DebugSystem.cpp" />
|
||||||
<ClCompile Include="..\..\src\Systems\FreeSteeringSystem.cpp" />
|
<ClCompile Include="..\..\src\Systems\FreeSteeringSystem.cpp" />
|
||||||
|
<ClCompile Include="..\..\src\Systems\HelicopterSteeringSystem.cpp" />
|
||||||
<ClCompile Include="..\..\src\Systems\InputSystem.cpp" />
|
<ClCompile Include="..\..\src\Systems\InputSystem.cpp" />
|
||||||
<ClCompile Include="..\..\src\Systems\ParticleSystem.cpp" />
|
<ClCompile Include="..\..\src\Systems\ParticleSystem.cpp" />
|
||||||
<ClCompile Include="..\..\src\Systems\PhysicsSystem.cpp" />
|
<ClCompile Include="..\..\src\Systems\PhysicsSystem.cpp" />
|
||||||
@@ -131,6 +132,7 @@
|
|||||||
<ClInclude Include="..\..\src\Components\DirectionalLight.h" />
|
<ClInclude Include="..\..\src\Components\DirectionalLight.h" />
|
||||||
<ClInclude Include="..\..\src\Components\ExtendedMeshShape.h" />
|
<ClInclude Include="..\..\src\Components\ExtendedMeshShape.h" />
|
||||||
<ClInclude Include="..\..\src\Components\FreeSteering.h" />
|
<ClInclude Include="..\..\src\Components\FreeSteering.h" />
|
||||||
|
<ClInclude Include="..\..\src\Components\HelicopterSteering.h" />
|
||||||
<ClInclude Include="..\..\src\Components\HingeConstraint.h" />
|
<ClInclude Include="..\..\src\Components\HingeConstraint.h" />
|
||||||
<ClInclude Include="..\..\src\Components\Input.h" />
|
<ClInclude Include="..\..\src\Components\Input.h" />
|
||||||
<ClInclude Include="..\..\src\Components\MeshShape.h" />
|
<ClInclude Include="..\..\src\Components\MeshShape.h" />
|
||||||
@@ -152,6 +154,7 @@
|
|||||||
<ClInclude Include="..\..\src\CubemapTexture.h" />
|
<ClInclude Include="..\..\src\CubemapTexture.h" />
|
||||||
<ClInclude Include="..\..\src\Engine.h" />
|
<ClInclude Include="..\..\src\Engine.h" />
|
||||||
<ClInclude Include="..\..\src\Entity.h" />
|
<ClInclude Include="..\..\src\Entity.h" />
|
||||||
|
<ClInclude Include="..\..\src\Events\ApplyForce.h" />
|
||||||
<ClInclude Include="..\..\src\Events\BindGamepadAxis.h" />
|
<ClInclude Include="..\..\src\Events\BindGamepadAxis.h" />
|
||||||
<ClInclude Include="..\..\src\Events\BindGamepadButton.h" />
|
<ClInclude Include="..\..\src\Events\BindGamepadButton.h" />
|
||||||
<ClInclude Include="..\..\src\Events\BindKey.h" />
|
<ClInclude Include="..\..\src\Events\BindKey.h" />
|
||||||
@@ -188,6 +191,7 @@
|
|||||||
<ClInclude Include="..\..\src\System.h" />
|
<ClInclude Include="..\..\src\System.h" />
|
||||||
<ClInclude Include="..\..\src\Systems\DebugSystem.h" />
|
<ClInclude Include="..\..\src\Systems\DebugSystem.h" />
|
||||||
<ClInclude Include="..\..\src\Systems\FreeSteeringSystem.h" />
|
<ClInclude Include="..\..\src\Systems\FreeSteeringSystem.h" />
|
||||||
|
<ClInclude Include="..\..\src\Systems\HelicopterSteeringSystem.h" />
|
||||||
<ClInclude Include="..\..\src\Systems\InputSystem.h" />
|
<ClInclude Include="..\..\src\Systems\InputSystem.h" />
|
||||||
<ClInclude Include="..\..\src\Systems\ParticleSystem.h" />
|
<ClInclude Include="..\..\src\Systems\ParticleSystem.h" />
|
||||||
<ClInclude Include="..\..\src\Systems\PhysicsSystem.h" />
|
<ClInclude Include="..\..\src\Systems\PhysicsSystem.h" />
|
||||||
|
|||||||
@@ -63,6 +63,7 @@
|
|||||||
<ClCompile Include="..\..\src\Systems\TankSteeringSystem.cpp">
|
<ClCompile Include="..\..\src\Systems\TankSteeringSystem.cpp">
|
||||||
<Filter>Physics\Systems</Filter>
|
<Filter>Physics\Systems</Filter>
|
||||||
</ClCompile>
|
</ClCompile>
|
||||||
|
<ClCompile Include="..\..\src\Systems\HelicopterSteeringSystem.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Filter Include="Util">
|
<Filter Include="Util">
|
||||||
@@ -137,6 +138,21 @@
|
|||||||
<Filter Include="Physics\Events">
|
<Filter Include="Physics\Events">
|
||||||
<UniqueIdentifier>{42ae084f-ade8-402c-87ba-f03f6b846bc8}</UniqueIdentifier>
|
<UniqueIdentifier>{42ae084f-ade8-402c-87ba-f03f6b846bc8}</UniqueIdentifier>
|
||||||
</Filter>
|
</Filter>
|
||||||
|
<Filter Include="Gameplay">
|
||||||
|
<UniqueIdentifier>{5b992473-73e6-485e-8f13-17e0801fb2ca}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Gameplay\Vehicles">
|
||||||
|
<UniqueIdentifier>{8a78be3a-a3c5-4054-a2f1-1456f3fcbab0}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Gameplay\Vehicles\Helicopter">
|
||||||
|
<UniqueIdentifier>{8ccc0abe-5bdd-4656-ab11-5708a39c71ae}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Gameplay\Vehicles\Helicopter\Components">
|
||||||
|
<UniqueIdentifier>{b2416d05-a49e-4fef-a5c4-cd03d8cc2efd}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
|
<Filter Include="Gameplay\Vehicles\Helicopter\Systems">
|
||||||
|
<UniqueIdentifier>{b34c0c95-a887-4cf4-af24-cf7c1f459aa8}</UniqueIdentifier>
|
||||||
|
</Filter>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClInclude Include="..\..\src\World.h" />
|
<ClInclude Include="..\..\src\World.h" />
|
||||||
@@ -356,6 +372,15 @@
|
|||||||
<ClInclude Include="..\..\src\Events\LockMouse.h">
|
<ClInclude Include="..\..\src\Events\LockMouse.h">
|
||||||
<Filter>Input\Events</Filter>
|
<Filter>Input\Events</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\src\Components\HelicopterSteering.h">
|
||||||
|
<Filter>Gameplay\Vehicles\Helicopter\Components</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\src\Systems\HelicopterSteeringSystem.h">
|
||||||
|
<Filter>Gameplay\Vehicles\Helicopter\Systems</Filter>
|
||||||
|
</ClInclude>
|
||||||
|
<ClInclude Include="..\..\src\Events\ApplyForce.h">
|
||||||
|
<Filter>Physics\Events</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<None Include="..\..\src\Shaders\Fragment2.glsl">
|
<None Include="..\..\src\Shaders\Fragment2.glsl">
|
||||||
|
|||||||
Reference in New Issue
Block a user