Skip to content

Commit

Permalink
Don't bundle extra transform with camera in many sprites examples (be…
Browse files Browse the repository at this point in the history
…vyengine#6079)

Fixes bevyengine#6077 
# Objective

- Make many_sprites and many_animated_sprites work again

## Solution

- Removed the extra transform from the camera bundle - not sure why it was necessary, since `Camera2dBundle::default()` already contains a transform with the same parameters.

---
  • Loading branch information
Carlrs committed Sep 25, 2022
1 parent 847c26b commit 750ec41
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 2 additions & 4 deletions examples/stress_tests/many_animated_sprites.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ fn setup(
let texture_atlas_handle = texture_atlases.add(texture_atlas);

// Spawns the camera
commands.spawn((
Camera2dBundle::default(),
Transform::from_xyz(0.0, 0.0, 1000.0),
));

commands.spawn(Camera2dBundle::default());

// Builds and spawns the sprites
for y in -half_y..half_y {
Expand Down
6 changes: 2 additions & 4 deletions examples/stress_tests/many_sprites.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,8 @@ fn setup(mut commands: Commands, assets: Res<AssetServer>, color_tint: Res<Color
let sprite_handle = assets.load("branding/icon.png");

// Spawns the camera
commands.spawn((
Camera2dBundle::default(),
Transform::from_xyz(0.0, 0.0, 1000.0),
));

commands.spawn(Camera2dBundle::default());

// Builds and spawns the sprites
let mut sprites = vec![];
Expand Down

0 comments on commit 750ec41

Please sign in to comment.