davidfig/pixi-viewport

Dragging in viewport

Closed this issue · 2 comments

I'm trying to create something like this example but with viewport:
https://pixijs.com/examples/events/dragging

So I want to drag the viewport around when I'm not clicking an object and when I do click on an object, start draggin that.

I'm running into issues with objects jumping around the scene by exactly the distance I dragged the viewport.
Do you have an example showcasing this perhaps? I was trying to recreate my problem in a codepen, but I can't get pixi-viewport working in codepen correctly yet...

I would suggest you to setup a demo with your implementation, because it is difficult to say what is the problem in your case just by your description. It seems most likely to be a mathematical mistake in some formulas of your implementation.

Had some help from the pixi discord and it has been resolved by now. Forgot to close this issue though. Thanks either way!