2D top-down camera example#12720
Conversation
|
Welcome, new contributor! Please make sure you've read our contributing guide and we look forward to reviewing your pull request shortly ✨ |
|
The generated |
3218652 to
fc4f85b
Compare
|
The generated |
fc4f85b to
79e246f
Compare
|
The generated |
79e246f to
c3ebe18
Compare
|
@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. |
|
Multiple small examples is perfect, thank you! |
c3ebe18 to
de08756
Compare
mgi388
left a comment
There was a problem hiding this comment.
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. |
de08756 to
aa080d7
Compare
7c77fc5 to
f07b159
Compare
|
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 |
|
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). |
jonathaningram
left a comment
There was a problem hiding this comment.
Ran it locally, looks good to me. Only nitpick I'd make is that you can move outside of the pretend "bounds" of the example, but I don't think it's a big deal to worry about for this example.
|
Thanks everyone for the reviews! I Learned a lot through this small example ✌️. |
# Objective This PR addresses the 2D part of #12658. I plan to separate the examples and make one PR per camera example. ## Solution Added a new top-down example composed of: - [x] Player keyboard movements - [x] UI for keyboard instructions - [x] Colors and bloom effect to see the movement of the player - [x] Camera smooth movement towards the player (lerp) ## Testing ```bash cargo run --features="wayland,bevy/dynamic_linking" --example 2d_top_down_camera ``` https://github.com/bevyengine/bevy/assets/10638479/95db0587-e5e0-4f55-be11-97444b795793
Objective
This PR addresses the 2D part of #12658. I plan to separate the examples and make one PR per camera example.
Solution
Added a new top-down example composed of:
Testing
cargo run --features="wayland,bevy/dynamic_linking" --example 2d_top_down_cameraexample-2d-top-down.mp4