We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpPrograms › rotating sprites to point
Page Index Toggle Pages: 1
rotating sprites to point (Read 345 times)
rotating sprites to point
Jun 17th, 2007, 3:04am
 
Hey,
I am trying to mock up a flock of butterflies to turn and follow a point using color tracking. I have looked at the Boid system but find it is a little to complicated for me (very new to this all).
I am using an array of sprites at the moment, inputing some random variables to have a vague (very vague flock effect) but   it would be more believable if the butterflies turned to the point.
I'm certain some solution exists to make the sprite rotate but am unable to find it myself.

Re: rotating sprites to point
Reply #1 - Jun 17th, 2007, 12:50pm
 
Hi,
Check out the Arctangent example. Good luck!
Re: rotating sprites to point
Reply #2 - Jun 17th, 2007, 1:53pm
 
thank you,
that should do it.
Page Index Toggle Pages: 1