Skip to content

Commit

Permalink
fix bug
Browse files Browse the repository at this point in the history
  • Loading branch information
wuyukwi committed Aug 28, 2023
1 parent b245c35 commit 7b5b4c3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ https://github.com/wuyukwi/LunarYueEngine/releases
### 5.1 マウス操作
- `右マウスボタン`を押している間、カメラの角度をマウスの動きに従って変更できます。
- `中マウスボタン`を押している間、マウスの動きに応じてカメラを平行移動できます。
- `マウスホイール`を回すことで、カメラをズームイン/ズームアウトすることができます。

### 5.2 キーボード操作
- `右マウスボタン`を押している間、以下のキーボードの操作が可能になります:
Expand Down
8 changes: 4 additions & 4 deletions source/editor/editor_runtime/interface/docks/scene_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ void handle_camera_movement()
auto dt = sim.get_delta_time().count();

auto transform = editor_camera.get_component<transform_component>().lock();
float movement_speed = 5.0f;
float movement_speed = 10.0f;
float rotation_speed = 0.2f;
float multiplier = 5.0f;
auto delta_move = input.get_cursor_delta_move();
Expand Down Expand Up @@ -553,10 +553,10 @@ void handle_camera_movement()
transform->rotate(0.0f, dx, 0.0f);
transform->rotate_local(dy, 0.0f, 0.0f);
}

float delta_wheel = input.get_mouse_wheel_scroll_delta_move();
transform->move_local({0.0f, 0.0f, 14.0f * movement_speed * delta_wheel * dt});
}

float delta_wheel = input.get_mouse_wheel_scroll_delta_move();
transform->move_local({0.0f, 0.0f, 14.0f * movement_speed * delta_wheel * dt});
}

static void process_drag_drop_target(const std::shared_ptr<camera_component>& camera_comp)
Expand Down

0 comments on commit 7b5b4c3

Please sign in to comment.