Commit e7570b44 authored by Florian Oetke's avatar Florian Oetke
Browse files

fixed clang compiler error in movement_system.cpp

parent 0eb27437
Pipeline #3289 failed with stage
in 3 minutes and 35 seconds
......@@ -87,14 +87,15 @@ namespace phase_shifter::gameplay {
auto offset = -move.last_step * t0 + move.last_step * t1;
auto pos = glm::vec2(transform.position.x, transform.position.z);
auto entity_handle = entity.handle();
entity.process([&](Rigid_body_comp& body) {
_level_system.check_contacts(pos + offset, body.radius, [&](util::Contact contact) {
if(contact.distance2 <= 0.0001f) {
offset = glm::vec2(0, 0);
_bus.send<Entity_hit_wall>(entity.handle());
_bus.send<Entity_hit_wall>(entity_handle);
} else if(auto normal_vel = glm::dot(offset, contact.normal); normal_vel > 0) {
offset -= normal_vel * contact.normal;
_bus.send<Entity_hit_wall>(entity.handle());
_bus.send<Entity_hit_wall>(entity_handle);
}
});
});
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment