Skip to content

Add perspective projection, ability to hotswap between orthographic and perspective#89

Open
Nomagno wants to merge 2 commits into
orhun:mainfrom
Nomagno:perspective_projection
Open

Add perspective projection, ability to hotswap between orthographic and perspective#89
Nomagno wants to merge 2 commits into
orhun:mainfrom
Nomagno:perspective_projection

Conversation

@Nomagno
Copy link
Copy Markdown

@Nomagno Nomagno commented May 31, 2026

Hey!
Ctrl + Alt + O -> Regular orthographic view
Ctrl + Alt + P -> New perspective view ('videogame camera' style)
Basically, both cameras are created at startup, but only the requested one is activated in Bevy. Not sure if this might suppose a performance penalty. I am also not an expert in Rust nor Bevy, so sorry if something's improvable 😅. I also refactored a bunch of match statements into comparisons against is_3d() where I thought it might be reasonable, since 3 long enum values per arm seemed silly once I added the new Persp3d mode (I can revert this if needed).

I can make an issue if needed to discuss this further, just thought it was worth making a PR over since I had already implemented it. Demo video attached with the fixes from my other PR (for demo purposes since it uses the animation system).

persp_demo_compressed.mp4

@arf20
Copy link
Copy Markdown

arf20 commented May 31, 2026

nice

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

Successfully merging this pull request may close these issues.

2 participants