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

Camera uses XZY instead of XYZ #8

Open
DavJCosby opened this issue May 13, 2021 · 4 comments
Open

Camera uses XZY instead of XYZ #8

DavJCosby opened this issue May 13, 2021 · 4 comments

Comments

@DavJCosby
Copy link

DavJCosby commented May 13, 2021

According to the bevy-cheatbook,

  • The X axis goes from left to right (+X points right).
  • The Y axis goes from bottom to top (+Y points up).
  • The Z axis goes from far to near (+Z points towards you, out of the screen).

I noticed, however, while using the flycam that the A & D keys slide the camera on the local X axis, W & D on the Z axis, and Shift & Space on the Y axis. Because of this, I ended up modeling my world in XZY space, which caused problems later down the line for me. Shouldn't Z be treated as the "up and down" axis, rather than Y, for the sake of consistency?

@sburris0
Copy link
Owner

Not a fan of this convention, but consistency is much more important. I'll make the change soon.

@sburris0
Copy link
Owner

Sorry, I forgot about this. I can add an xyz cargo feature, but I'm doubting bevy-cheatbook because adding a plane without specifying a rotation (see example) is parallel to what bevy_flycam would call the ground.

@oli-obk
Copy link

oli-obk commented Nov 30, 2023

yea, I don't think this crate is doing anything wrong. See my changes in #41 which use the bevy functions for forward and right (and which work exactly like they did before if up is Vec::Y

If you want a different orientation, you can change what up is after my PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants
@oli-obk @sburris0 @DavJCosby and others