4 stable releases
2.0.0 | Apr 10, 2021 |
---|---|
1.0.2 | Jan 2, 2021 |
1.0.1 | Dec 25, 2020 |
#1970 in Game dev
7KB
122 lines
An orbit controls plugin for bevy.
Usage
Register the OrbitCameraPlugin
, and add the OrbitCamera
struct to the
entity containing the camera.
For example, within the startup system:
commands
.spawn(Camera3dBundle {
transform: Transform::from_translation(Vec3::new(-3.0, 3.0, 5.0))
.looking_at(Vec3::default(), Vec3::unit_y()),
..Default::default()
})
.with(OrbitCamera::default());
To control the camera, use dragging (left button) to rotate and the mouse wheel to zoom.
Dependencies
~24–67MB
~661K SLoC