0 votes

Dear developers

I am new in game programming and in developing game using Godot engine and is facing the above problem.

I have a 720x1090 screen resolution and it will be in portrait mode. I wished to create a overlay node(like a dialog) in a smaller size(600x600) and that node will contain a large image(full body human character) and I want it zoomable and pannable for the player look at(zoom/pan) the full body/half body/face/hand/feet/etc but it is not working well.

Here is my node setup:
Main node
--player cash label(on top)
--hboxcontainer which holds 4 buttons to change screen(on bottom)
--dialog_node(big image view)

--viewportcontainer(clip content on)(600x600)(should work like a subscene)
------camera2d(current on)

And uses this tutorial for camera interaction: https://kidscancode.org/godot_recipes/2d/touchscreen_camera/

The result is i cannot touch anything inside the dialog_node to interact with it, instead it can interact with the image inside when i touch outside on viewport which is wrong.

Is there any tutorial/sample code that can do zoom/pan large image inside a viewport irrelevant to my main game UI

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.