16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-18 08:59:18 +02:00
This commit is contained in:
2026-05-24 21:48:05 +02:00
parent 5b51188dfe
commit 2c599cb419
46 changed files with 2034 additions and 85 deletions

View File

@@ -13,6 +13,7 @@ void MovementSystem::Update(ECWorld& world, float dt)
constexpr double damping = 0.90; // 0.0 = instant stop, 1.0 = without damping
world.Each<ECSComponent::Transform, ECSComponent::Velocity>(
entt::exclude<ECSComponent::Disabled>,
[dt](auto entity, auto& transform, auto& velocity)
{
@@ -22,7 +23,7 @@ void MovementSystem::Update(ECWorld& world, float dt)
if (glm::length(velocity.Value) < 0.001)
{
velocity.Value = glm::dvec3(0.0);
velocity.Value = glm::vec3(0.0f);
}
}
);