How to specify a display area for many sprites? #14092
-
Sprite will not be visible when it leaves area. Cropped when sprite is close to the edge. Camera.viewport does the job but I need to keep tweaking it when changing window resolution. Is there a simpler way? |
Beta Was this translation helpful? Give feedback.
Answered by
miketwenty1
Jul 3, 2024
Replies: 1 comment 3 replies
-
I haven't had to deal with this problem myself yet, but I'd check out: pub visible_entities: VisibleEntities,
pub frustum: Frustum https://docs.rs/bevy/0.13.2/bevy/render/view/struct.VisibleEntities.html Within the Camera2dBundle |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The only way I would know to "crop" a sprite on screen would be to make it visible but then adjust the camera so it appears to be cropped, or make a high z layer mesh/sprite or ui that will cover it up as it leaves an area. Do you have a screenshot of the problem so it's more clear?