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

Parallax background mirrors late on mobile aspect ratio. #86337

Closed
theBSH opened this issue Dec 19, 2023 · 1 comment
Closed

Parallax background mirrors late on mobile aspect ratio. #86337

theBSH opened this issue Dec 19, 2023 · 1 comment

Comments

@theBSH
Copy link

theBSH commented Dec 19, 2023

Tested versions

4.2 mono

System information

Godot v4.2.stable.mono - Windows 10.0.22621 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3060 (NVIDIA; 31.0.15.3742) - 11th Gen Intel(R) Core(TM) i5-11600K @ 3.90GHz (12 Threads)

Issue description

got this issue when porting my game to mobile the parallax background mirrors late bks it still thinks the aspect ratio is 16:9.
made this video to show case it (you don't need a mobile to reproduce):

paralxissue.mp4

Steps to reproduce

watch the video

Minimal reproduction project (MRP)

mirroringlate_problem.zip

@Calinou
Copy link
Member

Calinou commented Dec 20, 2023

Thanks for the report! Consolidating in #27160.

This occurs because ParallaxBackground can only draw 2 copies of the image at most. You start seeing the copy on the right when the copy on the left no longer has to be drawn.

To resolve this, use an image with a wider aspect ratio (I suggest 21:9) or draw parallax manually using a Sprite2D and region properties.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants