cloudiful-bevy-camera
Reusable Bevy camera switching core.
What it provides
CameraSwitchPlugin: registers request handling and switch eventsSwitchableCamera: marker/config component for cameras managed by coreSwitchCameraRequest: external switch request APICameraSwitched: emitted when active switchable camera changes
What it does not provide
- camera spawning or setup helpers
- keyboard or gamepad bindings
- settings, rebind, or device-selection logic
- UI focus gating or project-specific business rules
This crate stays narrow on purpose: project code marks cameras with
SwitchableCamera and sends SwitchCameraRequest values.
An optional input_bindings feature adds a minimal Bevy-native input layer.
It stays generic on purpose:
- keyboard via
ButtonInput<KeyCode> - optional native gamepad bindings via Bevy
Gamepad - no control-settings resource
- no rebind workflow
- no primary-device selection
- no UI/business-state gating
Stable ordering
Candidates always sort by:
order_keyslot.unwrap_or(u8::MAX)- entity index
That same ordering drives cycle behavior and repeated-slot tie breaking.
Usage
Core only
use *;
use ;
new.add_plugins;
input_bindings feature
use *;
use ;
new
.add_plugins
.insert_resource;
Feature-disabled builds still compile only the core switching API.