Skip to content
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

[Merged by Bors] - Add examples for Transforms #2441

Closed
wants to merge 34 commits into from

Conversation

l4desu-mizu
Copy link
Contributor

Add Transform Examples

I've stumbled upon this project and been fiddling around a little. Saw the issue and thought I might just add some examples for the proposed transformations.
Mind to check if I got the gist correctly and suggest anything I can improve?

@github-actions github-actions bot added the S-Needs-Triage This issue needs to be labelled label Jul 6, 2021
@alice-i-cecile
Copy link
Member

bors try

bors bot added a commit that referenced this pull request Jul 6, 2021
@bors
Copy link
Contributor

bors bot commented Jul 6, 2021

try

Build failed:

@NathanSWard NathanSWard added A-Core Common functionality for all bevy apps C-Examples An addition or correction to our examples and removed S-Needs-Triage This issue needs to be labelled labels Jul 6, 2021
Copy link
Contributor

@NathanSWard NathanSWard left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a nice addition.

Note, you'll also have to update the README.md inside the examples/ directory.

examples/transforms/global_vs_local_translation.rs Outdated Show resolved Hide resolved
examples/transforms/transform.rs Outdated Show resolved Hide resolved
@NathanSWard
Copy link
Contributor

Also as a quick note, it's nice if inside the examples themselves, there are more comments explaining what's happening.
Adding some comments to explain what each system does, what you're spawning in the setup systems, would be a nice addition 😄

examples/transforms/rotation.rs Outdated Show resolved Hide resolved
@alice-i-cecile
Copy link
Member

As the CI noted, you need to add these to the examples README :)

@alice-i-cecile
Copy link
Member

Good stuff! This is really helpful.

Two areas of content that I think should be addressed in this section eventually:

  • more guidance on how to work with rotations: probably a few more examples for them and a pointer to [Quat]'s methods. I've seen lots of confusion around quaternions, axes of rotation, how to use them in a 2D context and so on. @bitshifter, would a docs PR (from me) to glam's Quat with a glossary of terms be welcome here? We're just re-exporting it, so that's where the docs should be changed
  • non-uniform scaling (@cart, have you come to a decision about what we should do about this in the engine as a whole?)

@bitshifter
Copy link
Contributor

* more guidance on how to work with rotations: probably a few more examples for them and a pointer to [`Quat`]'s methods. I've seen lots of confusion around quaternions, axes of rotation, how to use them in a 2D context and so on. @bitshifter, would a docs PR (from me) to `glam`'s `Quat` with a glossary of terms be welcome here? We're just re-exporting it, so that's where the docs should be changed

I'm happy to look at a PR or an issue to improve documentation. What did you have in mind glossary wise? The use of quaternions for rotations in 2D may be a bit bevy specific? I'd not sure what docs for a non bevy audience would look like there. Probably the easiest way to progress would be via either https:/bitshifter/glam-rs/discussions or https:/bitshifter/glam-rs/issues.

@l4desu-mizu
Copy link
Contributor Author

l4desu-mizu commented Jul 7, 2021

Just so you all know, I've seen all your comments and am baffled at the speed of your reaction. 😄
I'll work through your suggestions, but I might need some time. Hope you don't mind if i'm a bit slow with the rework.

@l4desu-mizu
Copy link
Contributor Author

So I tried to rework the global vs local translation example as suggested by RustyStriker. I do think the code does get somewhat simpler when enabling interaction even though it now contains multiple aspects of bevy. However it's a more complex thing and I hope the way I defined the systems keeps it somewhat distinguished.
For now I'd like to refrain from changing the more simpler examples for the same reason. It'd seem to me that adding inputs and even text would distract form the basic goal of the example, even if the current way for decisions in these examples might not be ideal...

However, I try to keep up to date with main, but I haven't figured out what the advisories-check wants me to do. I don't think I changed dependencies, so it's a bit confusing to me that it says that there are security advisories or unmaintained crates. I cannot see additional information either. Is someone of you able to help me with that?

* use derive component for used components
@alice-i-cecile
Copy link
Member

However, I try to keep up to date with main, but I haven't figured out what the advisories-check wants me to do. I don't think I changed dependencies, so it's a bit confusing to me that it says that there are security advisories or unmaintained crates. I cannot see additional information either. Is someone of you able to help me with that?

This is a global Bevy issue: one of our dependencies started triggering this about a month back. Your PR is fine; just ignore it.

@alice-i-cecile alice-i-cecile added the S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it label Mar 15, 2022
@alice-i-cecile
Copy link
Member

bors r+

bors bot pushed a commit that referenced this pull request Mar 15, 2022
# Add Transform Examples

- Adding examples for moving/rotating entities (with its own section) to resolve #2400 

I've stumbled upon this project and been fiddling around a little. Saw the issue and thought I might just add some examples for the proposed transformations.
Mind to check if I got the gist correctly and suggest anything I can improve?
@bors bors bot changed the title Add examples for Transforms [Merged by Bors] - Add examples for Transforms Mar 15, 2022
@bors bors bot closed this Mar 15, 2022
aevyrie pushed a commit to aevyrie/bevy that referenced this pull request Jun 7, 2022
# Add Transform Examples

- Adding examples for moving/rotating entities (with its own section) to resolve bevyengine#2400 

I've stumbled upon this project and been fiddling around a little. Saw the issue and thought I might just add some examples for the proposed transformations.
Mind to check if I got the gist correctly and suggest anything I can improve?
ItsDoot pushed a commit to ItsDoot/bevy that referenced this pull request Feb 1, 2023
# Add Transform Examples

- Adding examples for moving/rotating entities (with its own section) to resolve bevyengine#2400 

I've stumbled upon this project and been fiddling around a little. Saw the issue and thought I might just add some examples for the proposed transformations.
Mind to check if I got the gist correctly and suggest anything I can improve?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Core Common functionality for all bevy apps C-Examples An addition or correction to our examples S-Ready-For-Final-Review This PR has been approved by the community. It's ready for a maintainer to consider merging it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a transform and Quaternion example section.
8 participants