Crates.io | bevy_map_camera |
lib.rs | bevy_map_camera |
version | |
source | src |
created_at | 2024-09-18 11:13:19.671886 |
updated_at | 2024-12-10 09:56:20.795502 |
description | 3D Camera Controller for Bevy |
homepage | |
repository | https://github.com/oscrim/bevy_map_camera |
max_upload_size | |
id | 1379075 |
Cargo.toml error: | TOML parse error at line 19, column 1 | 19 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
bevy_map_camera
A 3D camera controller inspired by Google Maps, f4maps and Charge Finder.
Based upon LookTransform, LookAngles and Orbital Camera Controller from smooth-bevy-cameras
.
bevy_easings
, part of default
features.
LookTransform
bevy_tweening
, requires bevy_tweening
feature.
LookTransformLens
GrabHeightLens
use bevy::prelude::*;
use bevy_map_cam::{MapCamera, LookTransform, MapCameraPlugin};
fn main() {
let mut app = App::new();
app.add_plugins(DefaultPlugins);
app.add_plugins(MapCameraPlugin::default());
app.add_systems(Startup, setup);
app.run();
}
fn setup(
mut commands: Commands,
mut meshes: ResMut<Assets<Mesh>>,
mut materials: ResMut<Assets<StandardMaterial>>,
) {
// plane
commands.spawn((
Mesh3d(meshes.add(Plane3d::default().mesh().size(10., 10.))),
MeshMaterial3d(materials.add(Color::from(DARK_GREEN))),
));
// Camera
commands.spawn(MapCamera);
}
Check out the projection example to see how to change between Perspective and Orthographic.
The main
branch is compatible with the latest Bevy release.
bevy_map_camera | bevy |
---|---|
0.2 | 0.15 |
0.1 | 0.14 |