bevyengine / bevyengine/bevy

Add bool toggle for camera controller in PanOrbitCamera component

Open Beginner friendly
#25,471 1 comment 0 reactions 0 assignees View on GitHub
A-Camera A-Editor C-Feature D-Straightforward
Dominant language
Rust
Stars
48.2k
Forks
4.8k
Avg merge
3d 22h
Merged PRs (30d)
161

Description

Sub-issue of #19741

[`PanOrbitCamera`](https://github.com/bevyengine/bevy/blob/main/crates/bevy_camera_controller/src/pan_orbit_camera/controller/component.rs) already have `enabled_motion` field, that can be used to disable some parts of camera control, but lacks simple global `bool` toggle like other camera controllers (e.g. [`PanCamera`](https://github.com/bevyengine/bevy/blob/8255d20b51f0f6cd88f770024b5107e27d74ddec/crates/bevy_camera_controller/src/pan_camera.rs#L53) ).

Add such field to `PanOrbitCamera` and update systems to use it.

## Additional context

Further discussions are welcome in [#editor-dev](https://discord.com/channels/691052431525675048/789987800014651412)

Contributor guide

Open the contributing guide

Research direction

Start with crates/bevy_camera_controller/src/pan_orbit_camera/controller/component.rs and inspect the existing PanOrbitCamera enabled_motion field. Compare it with the enabled toggle on PanCamera, then trace the PanOrbitCamera systems that consume the component. Done means PanOrbitCamera exposes a global bool toggle and those systems respect it.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
game-dev
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.