diff --git a/resources/Schema/Components/Physics.xml b/resources/Schema/Components/Physics.xml index 7dce027c..9d1638fb 100644 --- a/resources/Schema/Components/Physics.xml +++ b/resources/Schema/Components/Physics.xml @@ -1,4 +1,5 @@ + true diff --git a/resources/Schema/Components/Physics.xsd b/resources/Schema/Components/Physics.xsd index 001dd2c8..cc5e24bb 100644 --- a/resources/Schema/Components/Physics.xsd +++ b/resources/Schema/Components/Physics.xsd @@ -10,6 +10,7 @@ + diff --git a/src/Game/Systems/PlayerMovementSystem.cpp b/src/Game/Systems/PlayerMovementSystem.cpp index 536624b3..57eef38d 100644 --- a/src/Game/Systems/PlayerMovementSystem.cpp +++ b/src/Game/Systems/PlayerMovementSystem.cpp @@ -9,7 +9,9 @@ void PlayerMovementSystem::UpdateComponent(World* world, EntityWrapper& entity, ComponentWrapper& cPhysics = entity["Physics"]; glm::vec3& velocity = cPhysics["Velocity"]; - velocity.y -= 9.82 * dt; + if (cPhysics["Gravity"]) { + velocity.y -= 9.82 * dt; + } glm::vec3& position = cTransform["Position"]; position += velocity * (float)dt;