Object fly around another?

I have a sphere and i want another sphere to fly around that one(looped). Its a 2d game so it should fly around on one axis(so the flying sphere can be seen all the time). I bet you could accomplish this effect with iTween, but my knowledge about iTween is not good enough to do so.

Could someone help me with that problem? (A solution without iTween would be even better, cause iTween is giving me a bunch of error msgs!)

Celofa

I'm sure you could get an iTween-based solution to work, but doing it 'manually' should be fairly straightforward as well. Here's one possible solution:

  1. Create a game object and make it a child of the object that is to be 'orbited around'.

  2. Add a script to that object that rotates the object in the way you want (e.g. by modifying Transform.localEulerAngles).

  3. Add another game object as a child of the 'rotating' game object (this will be the 'orbiting' object).

  4. Position the orbiting object relative to the rotating game object to create an orbiting effect.