pixi-viewport
pixi-viewport copied to clipboard
viewport doesn't work properly when parent is scaled
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.
Is there any way to fix this?
There's always a way to fix things :smile: 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.