Gate half done

This commit is contained in:
ViktorLjung
2014-05-29 17:40:48 +02:00
parent fd188fded6
commit b8ec7e1dbd
3 changed files with 61 additions and 20 deletions
+3
View File
@@ -771,6 +771,9 @@ bool Systems::PhysicsSystem::OnSetVelocity( const Events::SetVelocity &event )
{
m_PhysicsWorld->markForWrite();
m_RigidBodies[event.Entity]->setLinearVelocity(GLMVEC3_TO_HKVECTOR4(event.Velocity));
auto transformComponent = m_World->GetComponent<Components::Transform>(event.Entity);
transformComponent->Velocity = event.Velocity;
m_PhysicsWorld->unmarkForWrite();
}
return true;
+1 -1
View File
@@ -82,7 +82,7 @@ void Systems::TriggerSystem::Flag( EntityID entity, EntityID phantomEntity )
m_World->RemoveComponent<Components::Trigger>(phantomEntity);
m_World->SetEntityParent(phantomEntity, entity);
auto phantomTransform = m_World->GetComponent<Components::Transform>(phantomEntity);
phantomTransform->Position = glm::vec3(1.f, 0.1f, 2.f);
phantomTransform->Position = glm::vec3(-1.5f, 0.1f, 2.f);
}