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;