entropylost / bevy-orbit-controls

Use https://github.com/bonsairobo/smooth-bevy-cameras instead, this is unmaintained.
ISC License
12 stars 5 forks source link

bevy-orbit-controls

An orbit controls plugin for bevy.

To control the camera, drag the mouse. The left button rotates. The wheel zooms.

Usage

Register the OrbitCameraPlugin, and insert the OrbitCamera struct into the entity containing the camera.

For example, within the startup system:

commands
    .spawn_bundle(PerspectiveCameraBundle {
        transform: Transform::from_translation(Vec3::new(-3.0, 3.0, 5.0))
            .looking_at(Vec3::default(), Vec3::Y),
        ..Default::default()
    })
    .insert(OrbitCamera::default());

Compatibility