From fd0bb18bd33877d43c9f166a9cc1eb83992e49d5 Mon Sep 17 00:00:00 2001 From: ViktorLjung Date: Sun, 18 May 2014 21:07:03 +0200 Subject: [PATCH] tank stuff --- src/GameWorld.cpp | 3 ++- src/Systems/PhysicsSystem.h | 2 +- src/Systems/TankSteeringSystem.cpp | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/GameWorld.cpp b/src/GameWorld.cpp index ca9dff4..fa338f2 100755 --- a/src/GameWorld.cpp +++ b/src/GameWorld.cpp @@ -222,11 +222,12 @@ void GameWorld::Initialize() transform->Position = glm::vec3(0, 5, 0); //transform->Orientation = glm::angleAxis(0.f, glm::vec3(0, 1, 0)); auto physics = AddComponent(tank); - physics->Mass = 45000; + physics->Mass = 25000; physics->Static = false; auto vehicle = AddComponent(tank); vehicle->MaxTorque = 5200.f; vehicle->MaxSteeringAngle = 90.f; + vehicle->MaxSpeedFullSteeringAngle = 4.f; AddComponent(tank); AddComponent(tank); diff --git a/src/Systems/PhysicsSystem.h b/src/Systems/PhysicsSystem.h index ef7cb70..0ff2bda 100644 --- a/src/Systems/PhysicsSystem.h +++ b/src/Systems/PhysicsSystem.h @@ -73,7 +73,7 @@ public: EntityID entity1 = m_RigidBodies[event.getBody(0)]; EntityID entity2 = m_RigidBodies[event.getBody(1)]; - LOG_INFO("Entities colliding: %i, %i ", entity1, entity2); + //LOG_INFO("Entities colliding: %i, %i ", entity1, entity2); } }; diff --git a/src/Systems/TankSteeringSystem.cpp b/src/Systems/TankSteeringSystem.cpp index dca3441..8a67039 100644 --- a/src/Systems/TankSteeringSystem.cpp +++ b/src/Systems/TankSteeringSystem.cpp @@ -87,6 +87,7 @@ bool Systems::TankSteeringSystem::TankSteeringInputController::OnCommand(const E if (event.Command == "horizontal") { m_Horizontal = val; + m_Vertical = -0.4f; } else if (event.Command == "vertical") {