Search Unity

How to rotate a GameObject?

Discussion in 'iOS and tvOS' started by dcp468, Jan 26, 2011.

  1. dcp468

    dcp468

    Joined:
    Aug 25, 2009
    Posts:
    129
    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
     

    Attached Files:

    Last edited: Jan 26, 2011
  2. RobbieDingo

    RobbieDingo

    Joined:
    Jun 2, 2008
    Posts:
    484

    Attached Files:

    sama-van likes this.
  3. dcp468

    dcp468

    Joined:
    Aug 25, 2009
    Posts:
    129
    @RobbieDingo, ... Sincere thanks for uploading that .zip file as it works great :)
     
  4. sama-van

    sama-van

    Joined:
    Jun 2, 2009
    Posts:
    1,734
    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!
     

    Attached Files: