bevy icon indicating copy to clipboard operation
bevy copied to clipboard

2D top-down camera example

Open theredfish opened this issue 1 year ago • 6 comments

This PR addresses the 2D part of #12658. I plan to separate the examples and make one PR per camera example.

Objective

  • Top-down camera movements towards the player with smoothing

What I implemented

  • [x] Player keyboard movements
  • [x] Colors and bloom effect to see the movement of the player
  • [x] Camera smooth movement towards the player (lerp)

theredfish avatar Mar 26 '24 00:03 theredfish

Welcome, new contributor!

Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨

github-actions[bot] avatar Mar 26 '24 00:03 github-actions[bot]

The generated examples/README.md is out of sync with the example metadata in Cargo.toml or the example readme template. Please run cargo run -p build-templated-pages -- update examples to update it, and commit the file change.

github-actions[bot] avatar Mar 26 '24 00:03 github-actions[bot]

The generated examples/README.md is out of sync with the example metadata in Cargo.toml or the example readme template. Please run cargo run -p build-templated-pages -- update examples to update it, and commit the file change.

github-actions[bot] avatar May 14 '24 21:05 github-actions[bot]

The generated examples/README.md is out of sync with the example metadata in Cargo.toml or the example readme template. Please run cargo run -p build-templated-pages -- update examples to update it, and commit the file change.

github-actions[bot] avatar May 16 '24 17:05 github-actions[bot]

@alice-i-cecile I decided to go with different PRs for the different examples. But if you prefer multiple ones in the same PR let me know.

I kept a simple scope for this one - should be straightforward. I wanted to add more like bounded camera but I don't think it would serve the purpose of the example. If you think it's valuable here I can add it.

theredfish avatar May 17 '24 09:05 theredfish

Multiple small examples is perfect, thank you!

alice-i-cecile avatar May 17 '24 13:05 alice-i-cecile

To help other reviewers, you might also consider including a video of the example in the PR description. Check the latest PR template, it has a "Testing" section.

Thanks for the review!

Regarding the video, I don't think it's easy for contributors to maintain the video through changes and it can be outdated at some point. Also it adds extra steps, you need tools to capture gif etc... maybe not ideal for everyone. Also I tried to add a gif but the file needs to be less than 10MB. My file is more than the max, I decided to not attach the gif. I added the cargo run command.

I'll send code changes soon.

theredfish avatar Jun 07 '24 21:06 theredfish

Ok finally found a way to make lighter mp4 records - I attached the record to the PR. If it can provide a good example for other contributions. I think I've addressed all the comments from last review. Should I squash my commits into one? I also rebased on main

theredfish avatar Jun 09 '24 12:06 theredfish

Don't worry about squashing, and thanks for the video! I'm happy with this, barring the complaints about the debug statements. Once those are removed you'll have my approval (and then we just need to find a second reviewer).

alice-i-cecile avatar Jun 09 '24 13:06 alice-i-cecile

Thanks everyone for the reviews! I Learned a lot through this small example ✌️.

theredfish avatar Jun 10 '24 14:06 theredfish