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

viewport doesn't work properly when parent is scaled #49

Open
davidfig opened this issue May 12, 2018 · 2 comments
Open

viewport doesn't work properly when parent is scaled #49

davidfig opened this issue May 12, 2018 · 2 comments

Comments

@davidfig
Copy link
Owner

When the viewport's parent scale is not 1, the input distance calculations are off.

For example, my current game uses a viewport within a scaled region. The drags are not scaled down to account for the parent's scale.

@eranimo
Copy link

eranimo commented Sep 2, 2018

Is there any way to fix this?

@davidfig
Copy link
Owner Author

davidfig commented Sep 2, 2018

There's always a way to fix things 😄 I decided to work around it last time instead of fixing it because of my schedule.

The right way to fix it would be to apply the worldtransform of the viewport in all viewport and input calculations (currently I cheat by using the scale and position). If done correctly, it would also support independent rotation of the viewport--something I'd also love to add a plugin (to support spinning while pinching).

Regrettably I don't have time right now, but I will add it to the list. and see if anyone else wants to take a shot.

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