Skip to content

joarfish/bevy_orbit_controls

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Bevy Orbit Controls

Very simple camera controller for bevy game engine inspired by threejs orbit controls.

This repo includes a simple example. Check it out via cargo run --example basic_usage.

Usage

Just add the OrbitControlsPlugin plugin during setup method and spawn the OrbitCameraControllerBundle component with the camera you want it attached to. The bundle will add a OrbitCameraController as well as a Transform component to the entity.

commands.spawn((
    Camera3d::default(),
    Projection::from(PerspectiveProjection {
        ..PerspectiveProjection::default()
    }),
    OrbitCameraControllerBundle::from(
        OrbitCameraController::new(vec3(5.0, 5.0, 5.0), Vec3::ZERO)
    )
));

About

Very simple camera controller for the bevy game engine

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages