-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for AtmosphereCamera
in child position
#40
Comments
Bevy gives you a couple warnings:
To see the atmosphere, you just need to add a If you are going to move your player around, you also want a Instead of adding both these bundles, you can just add a use bevy::prelude::*;
use bevy_atmosphere::prelude::*;
fn main() {
App::new()
.add_plugins(DefaultPlugins)
.add_plugin(AtmospherePlugin)
.add_startup_system(setup)
.run();
}
#[derive(Component)]
struct Player;
fn setup(mut commands: Commands) {
commands.spawn(Player)
.insert(SpatialBundle::default()) // or just `spawn((Player, SpatialBundle::default()))`
.with_children(|p| {
p.spawn((Camera3dBundle::default(), AtmosphereCamera::default()));
});
} |
I see, thanks for pointing that out! Surprisingly, |
Ah, interesting. I've never noticed that. I recommend reading more about Bevy's visiblity system. You're not the first person to be tripped up by it (I should make it part of an FAQ). |
The following modification of
examples/basic.rs
seems to not work for me:Is it not supported to have
AtmosphereCamera
as a child? Having theCamera
as a child is often useful because it inherits the transforms of the parentPlayer
. I am open to suggestions on how to better structure this if not supporting this is intentional.The text was updated successfully, but these errors were encountered: