bevyengine / bevy

A refreshingly simple data-driven game engine built in Rust
https://bevyengine.org
Apache License 2.0
36.62k stars 3.6k forks source link

Adding PerspectiveProjection or OrthographicProjection components doesn't get used by Camera3d #16556

Open atlv24 opened 2 days ago

atlv24 commented 2 days ago

Bevy version

anytime after required components got merged, 0.15.

What you did

Added a OrthographicProjection component and a Camera3d bundle to an entity

What went wrong

It added a default Projection component, and rendered as perspective, disregarding the OrthographicProjection component

atlv24 commented 2 days ago

So, the easiest fix is to make both specialized projection components not be components anymore. But that's a copout, how will custom projections work?

BenjaminBrienen commented 2 days ago

If there is already a projection component on the entity, I would expect that it satisfies the requirement and the default constructor isn't used to add another one.