You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
710 B
27 lines
710 B
use bevy::prelude::*; |
|
|
|
mod client_inputs; |
|
mod cursor_grab; |
|
mod head_orientation; |
|
|
|
pub use cursor_grab::is_cursor_grabbed; |
|
|
|
pub fn plugin(app: &mut App) { |
|
app.add_plugins(( |
|
client_inputs::plugin, |
|
cursor_grab::plugin, |
|
head_orientation::plugin, |
|
)); |
|
|
|
// Make entities require the `Pickable` component if |
|
// they should be considered for the picking system. |
|
app.insert_resource(MeshPickingSettings { |
|
require_markers: true, |
|
..default() |
|
}); |
|
|
|
// Insert `MeshPickingCamera` component on any 3D camera. |
|
app.add_observer(|event: On<Add, Camera3d>, mut commands: Commands| { |
|
commands.entity(event.entity).insert(MeshPickingCamera); |
|
}); |
|
}
|
|
|