• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to animate an object in a circle, but preserve it's orientation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to animate an object in a circle, but preserve it's orientation


  • Subject: Re: How to animate an object in a circle, but preserve it's orientation
  • From: Graham Cox <email@hidden>
  • Date: Fri, 5 Jun 2009 13:40:01 +1000


On 05/06/2009, at 1:34 PM, Miles wrote:

I am trying to figure out the easiest way to make an object animate around a
circle, but preserve it's orientation. Much in the way that a seat on a
ferris wheel would look as it goes 'round.
I assume there's a pretty simple solution, but I haven't thought of it yet.


Well, what have you tried so far?

This is simple on the face of it - you just compute the x, y coordinates of the object and increment the angle using a timer or something. Or did you mean specifically within an animation technology such as Core Animation? What is the "object". It's all a bit vague...

position.x = origin.x + radius * cos( angle );
position.y = origin.y + radius * sin( angle );
[object setPosition:position];



--Graham


_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: How to animate an object in a circle, but preserve it's orientation
      • From: Miles <email@hidden>
References: 
 >How to animate an object in a circle, but preserve it's orientation (From: Miles <email@hidden>)

  • Prev by Date: How to animate an object in a circle, but preserve it's orientation
  • Next by Date: Re: How to animate an object in a circle, but preserve it's orientation
  • Previous by thread: How to animate an object in a circle, but preserve it's orientation
  • Next by thread: Re: How to animate an object in a circle, but preserve it's orientation
  • Index(es):
    • Date
    • Thread