Skip to content

Zooming out can sometimes result in camera positioned such that out-of-bounds is visible #78

@damyanp

Description

@damyanp

https://github.com/damyanp/bevy_pancam/tree/damyanp/cam has a modified version of the clamped_borders example to help demonstrate this issue. It adds a sprite that's set to match the dimensions of the min/max extents of the camera.

Image

The idea here is that if any of the actual background shows through then something has gone wrong with the clamping behavior. Here's one way to make that happen:

  • Put the mouse cursor in the top-right corner of the window
  • Zoom in
  • Move the mouse cursor to the bottom-left corner of the window
  • Zoom out
Image

If the camera position moves at all then it snaps back to being clamped correctly.

I think that this is likely related to #43, and sounds like #38 might address it, but I think that the code has changed enough so that it cannot be trivially merged for me to try it out.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions