Fight with event leaking; disabled unncecessary camera checks

This commit is contained in:
2024-09-17 23:08:41 +03:00
parent c268a4992a
commit a9190fcc09
4 changed files with 47 additions and 52 deletions

View File

@@ -924,26 +924,6 @@ void RoadLinesEditor::handle_input()
{
if (editor->get_camera_mode() != 3)
return;
bool moved = false;
float xx = Input::get_singleton()->get_axis("left", "right");
float zz = Input::get_singleton()->get_axis("backward", "forward");
float hh = Input::get_singleton()->get_axis("action2", "action");
if (Math::abs(zz) > 0.1f) {
camera_motion.z -= zz;
moved = true;
}
if (Math::abs(xx) > 0.1f) {
camera_motion.x += xx;
moved = true;
}
if (Math::abs(hh) > 0.1f && Math::abs(xx) < 0.1f &&
Math::abs(zz) < 0.1f) {
camera_motion.y += 10.0f * hh;
moved = true;
}
if (moved)
camera_moved = true;
}
void RoadLinesEditor::place_zebras()
{