Gate fixed
This commit is contained in:
+1
-1
Submodule assets updated: bc811a1b39...8e4988fc2b
+3
-5
@@ -248,10 +248,8 @@ void GameWorld::Initialize()
|
||||
auto RampShape = CreateEntity(gateBase);
|
||||
auto transform = AddComponent<Components::Transform>(RampShape);
|
||||
transform->Position = glm::vec3(0, 0.24f, 0);
|
||||
auto box = AddComponent<Components::BoxShape>(RampShape);
|
||||
box->Width = 14.9f/2;
|
||||
box->Height = 0.38f/2;
|
||||
box->Depth = 1.484f/2;
|
||||
auto mesh = AddComponent<Components::MeshShape>(RampShape);
|
||||
mesh->ResourceName = "Models/Gate/Lift/RampCollision.obj";
|
||||
CommitEntity(RampShape);
|
||||
}
|
||||
CommitEntity(gateBase);
|
||||
@@ -296,7 +294,7 @@ void GameWorld::Initialize()
|
||||
auto trigger = AddComponent<Components::Trigger>(gateTrigger);
|
||||
auto triggerMove = AddComponent<Components::TriggerMove>(gateTrigger);
|
||||
triggerMove->Entity = gate;
|
||||
triggerMove->Time = 3.f;
|
||||
triggerMove->Time = 0.5f;
|
||||
triggerMove->GoalPosition = glm::vec3(0, -50 + 9.02345f, 150);
|
||||
|
||||
|
||||
|
||||
@@ -725,18 +725,12 @@ bool Systems::PhysicsSystem::OnTankSteer(const Events::TankSteer &event)
|
||||
{
|
||||
steeringX = (1 - (glm::clamp(abs(m_Vehicles[event.Entity]->calcKMPH() /vehicleComponent->TopSpeed), 0.f, 0.7f))) * steeringX;
|
||||
}
|
||||
|
||||
|
||||
if(abs(m_Vehicles[event.Entity]->calcKMPH()) < 2 && abs(m_Vehicles[event.Entity]->m_mainSteeringAngle) > 80.f * (HK_REAL_PI / 180))
|
||||
{
|
||||
deviceStatus->m_positionY = -0.4f;
|
||||
deviceStatus->m_positionX = steeringX;
|
||||
}
|
||||
// else if(m_Vehicles[event.Entity]->calcKMPH() > -2 && abs(m_Vehicles[event.Entity]->m_mainSteeringAngle) > 80.f * (HK_REAL_PI / 180))
|
||||
// {
|
||||
// deviceStatus->m_positionY = 0.4f;;
|
||||
// deviceStatus->m_positionX = -steeringX;
|
||||
// }
|
||||
else
|
||||
{
|
||||
deviceStatus->m_positionX = steeringX;
|
||||
|
||||
@@ -24,7 +24,7 @@ void Systems::TransformSystem::UpdateEntity( double dt, EntityID entity, EntityI
|
||||
{
|
||||
auto transform = m_World->GetComponent<Components::Transform>(entity);
|
||||
glm::vec3 move = m_MoveItems[entity].GoalPosition - transform->Position;
|
||||
move *= m_MoveItems[entity].Time;
|
||||
move /= m_MoveItems[entity].Time;
|
||||
m_MoveItems[entity].Time -= dt;
|
||||
|
||||
if(m_MoveItems[entity].Time <= 0)
|
||||
|
||||
Reference in New Issue
Block a user