+2 votes

I think the question is clear enough.. But, here is the problem...

I'm making a mobile game with full touch input and it is quite hard for me because there aren't many tutorial out there for Godot mobile games with touch input

Now the problem.. I have a rotating wheel-like object that can be rotated 360 degree by player (2D Object, looks like a disc, so not 3D)
What should i do to make it possible for the player to spin the object left/right and up/down or maybe they will also spin their finger on the screen

Might be able to use InputEventScreenDrag for this, but the problem lies on how to detect the player's gesture

Hopefully its not too confusing for you all kind people who is willing to help
Ohh.. And before that.. Thank you

in Engine by (21 points)

1 Answer

0 votes
Best answer

You can put a point (Node2D) in the center of the wheel and then use "look_at" the position of the touch input. This will give you the "point" rotation. From there you can go on.

by (329 points)
selected by

Why.. It hadn't occured in my mind before to use that
Thank you so much

The wheel snaps and immediately looks at the event.position
How can I make it register a touch from any point of the wheel such that
it emulates rotating a real wheel

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 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 webmaster@godotengine.org with your username.