Skip to content

Commit

Permalink
Fix alien_cake_addict: cake should not be at height of player's locat…
Browse files Browse the repository at this point in the history
…ion (bevyengine#1954)

Just to avoid confusion to close readers of the example, this fix ensures cake is transformed to the height at the cake's cell, rather than the height at the player's cell.

Without this, cake may be floating or buried, depending on where the player is standing at time of spawning.

Love your work!
  • Loading branch information
Alister Lee authored and ostwilkens committed Jul 27, 2021
1 parent 2587533 commit 6251f76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/game/alien_cake_addict.rs
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,7 @@ fn spawn_bonus(
Transform {
translation: Vec3::new(
game.bonus.i as f32,
game.board[game.player.j][game.player.i].height + 0.2,
game.board[game.bonus.j][game.bonus.i].height + 0.2,
game.bonus.j as f32,
),
..Default::default()
Expand Down

0 comments on commit 6251f76

Please sign in to comment.