Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camera is super zoomed out on Microsoft Surface Pro but works as expected on another laptop #75

Open
farazk86 opened this issue Jan 25, 2025 · 2 comments

Comments

@farazk86
Copy link

This issue is being submitted after discussion from this thread: https://forum.defold.com/t/trying-to-understand-camera-projections-and-game-screen-size/79318/8

In summary, the camera with a zoom of 1 works as expected and appears normal on my msi laptop, i.e. placing tiles at the top left and bottom right of the GUI in the editor appears as below on the msi machine (920 x 1080) resolution:

Image

but the same settings and tiles appear as below on my Microsoft surface pro laptop (2736 x 1824) resolution:

Image

minimal project attached.

for-github-issue.zip

@britzl
Copy link
Owner

britzl commented Feb 3, 2025

In summary, the camera with a zoom of 1 works as expected and appears normal on my msi laptop
but the same settings and tiles appear as below on my Microsoft surface pro laptop (2736 x 1824) resolution:

I have been working on a new version of this camera extension which uses the standard Defold camera component instead of a script which mimics the camera behavior. This version of the camera extension also does a best effort DPI ratio calculation on startup to keep zoom consistent regardless of the scaling factor of the screen. You can test this version by setting this as your dependency:

https://github.com/britzl/defold-orthographic/archive/refs/heads/dev-use-camera-component.zip

@farazk86
Copy link
Author

farazk86 commented Feb 4, 2025

That fixed it, thanks. Setting your new version as the dependency fixed the zoom and resolution problem on my surface pro. Below is a screenshot of the same project pasted above:

Image

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

No branches or pull requests

2 participants