rotate more than 360?

Discussion in 'iOS Development' started by cybohemia, Feb 28, 2009.

  1. cybohemia

    cybohemia New Member

    Joined:
    Jan 25, 2009
    Messages:
    49
    Likes Received:
    0
    Device:
    iPhone 3G (Black)
    I tried using the CATransform3DMakeRotation to rotate an object 3 full times.

    That is, I wanted it to rotate 360 * 3 degrees around its axis. But it seems that it's only doing the nearest +/- 180 degrees. (I am converting to radians.)

    Maybe I'm missing something...is there any way to rotate beyond a full circle?

    Please Register or Log in to view images



    Any thoughts, advice or ideas greatly appreciated. Thanks!
  2. Kukumber

    Kukumber New Member

    Joined:
    Nov 10, 2008
    Messages:
    328
    Likes Received:
    0
    Device:
    2G iPod touch
    If 3x360° in one go doesn't work, couldn't you just rotate it 360°, and again, and again?
  3. spykr

    spykr Banned

    Joined:
    Jan 4, 2009
    Messages:
    109
    Likes Received:
    0
    Or you could just rotate 1080...
  4. Kukumber

    Kukumber New Member

    Joined:
    Nov 10, 2008
    Messages:
    328
    Likes Received:
    0
    Device:
    2G iPod touch
    I think that is what he said.
  5. cybohemia

    cybohemia New Member

    Joined:
    Jan 25, 2009
    Messages:
    49
    Likes Received:
    0
    Device:
    iPhone 3G (Black)
    If 3x360° in one go doesn't work, couldn't you just rotate it 360°, and again, and again?

    I'm doing the rotation while also translating the object and I can't easily tease out the points on the translation where the rotations can be evenly divided up, particularly since the path may change although the number of rotations is fixed.

    Or you could just rotate 1080...​
    I think that is what he said.​

    Yes, that is what I said...the system seems to take the modulo of anything greater than one rotation.
  6. centroid

    centroid New Member

    Joined:
    Nov 12, 2007
    Messages:
    405
    Likes Received:
    0
    Device:
    iPad 2 (Black)
    both directions 6pi?
  7. SkylarEC

    SkylarEC Super Moderator Emeritus Staff Member

    Joined:
    Sep 19, 2007
    Messages:
    6,642
    Likes Received:
    129
    I'm on my phone, so I can't provide the links, but on this forum, I told someone how to make a spinning wheel slow to a halt. In the tutorial subforum, I wrote up a multitouch tutorial that briefly explains radians. Please read both, and your problem will be no more.

Share This Page