Touch Input for Roulette Wheel (Rotating Wheel)

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By azureDev

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

:bust_in_silhouette: Reply From: usurun

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.

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

azureDev | 2019-07-05 03:10

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

GeorgeJJ | 2020-08-13 18:20