How to rotate a GameObject?

Hi

What would be the most effective way to have a GameObject at a fixed position [0,0] rotate around and follow the users finger for a full 360 effect on the GameObjects z axis only (clockwise and anticlockwise directions)?

I’ve tried a few ways but I’m not getting the desired effect?

Regards

483085--16956--$rotation.png

There has been a few posts about this before, try a search, or start here:

http://forum.unity3d.com/threads/41661-Rotate-Circle-with-Mouse-Drag-Problems?highlight=disc

Or if you are feeling really lazy, download my attached project which does it for you…

483139–16959–$DiskRotate.zip (1.27 MB)

1 Like

@RobbieDingo, … Sincere thanks for uploading that .zip file as it works great :slight_smile:

Converted it to C#.
UnityPackage from 2022.9.9f1.

However, what I am trying to do is to gather the angle increment and to constrain a direction…
If someone got something, that would help a bunch.
Thank you!

9365807–1309787–TurnDisk.unitypackage (115 KB)