How should I access my camera? #1886
-
I'm new to gamedev and ECS in general so basically I have no idea what I'm doing. I have a 2D game with an orthographic camera and an UI camera and I want to implement camera controls (drag and scroll), but only for the orthographic camera. How can I make sure to only operate on the ortho camera? If I use struct World {
camera: Option<Entity>
} or should I add a tag type to my camera and use Are there other solutions? What's the way to go here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
See #1854; this is a known issue that would be a simple fix in Bevy's source :) For now, you need to examine the camera's name field to distinguish them, or like you said, add a tag type to your camera entities. |
Beta Was this translation helpful? Give feedback.
See #1854; this is a known issue that would be a simple fix in Bevy's source :) For now, you need to examine the camera's name field to distinguish them, or like you said, add a tag type to your camera entities.