0 votes

Hi fellow developers

As the question above how to create a small viewport that can interact with its camera to pan and/or zoom using touch on a large image?

I tried using the touchcamera code found in kidscancode website but it does not work with my node setup. I even passed the inputs from parent node to the viewport but still does not allow me to pan/zoom the large image.

I also tried adding world to viewport and setting it to 2d and handling input local to either checked or not checked but it does not work.

Below is my node setup:
Main node: sized 720widthx1090height portrait on mobile
-- other node control
-- subscene (viewport node)

Viewport container:(subscene) sized 500x500
-- viewport
----camera (current option is checked)
----large image 2000x2000

Is there any setup i need to do?

in Engine by (14 points)

Please log in or register to answer this question.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.