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

fixed entity orientation in movement_system

parent a8f92995
......@@ -100,7 +100,9 @@ namespace phase_shifter::gameplay {
});
});
look_dir = offset;
if(glm::length2(offset) > 0.1f) {
look_dir = offset;
}
transform.position.x = pos.x + offset.x;
transform.position.z = pos.y + offset.y;
......@@ -120,7 +122,7 @@ namespace phase_shifter::gameplay {
transform.orientation = glm::normalize(glm::slerp(
transform.orientation,
glm::rotation(glm::vec3{0.f, 0.f, 1.f}, glm::vec3(look_dir.x, 0, look_dir.y)),
std::min(1.f, dt.value() * 4.f * _beat_system.graphic_time_scale())));
std::min(1.f, dt.value() * 10.f)));
}
}
}
......
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