Disco Light using CBEffects

I’m getting started tinkering with this wonderful bit of code and was hoping that someone might be able to help me out.

I am trying to create a disco light effect.  You know, the little spots that are thrown on the wall by a disco ball and then move with the turning of the ball.  Anyone have any idea how I could go about that?  I’ve been playing with the various presets that come with the library but haven’t had any luck so far.

Any help is appreciated.

Sorry for the delay; if you post in the CBEffects forum, I’ll get a notification immediately.

It sounds like the main difficulty with what you need to do is with rotating particles around an axis. That’s a slightly advanced topic, but Corona makes it pretty easy with groups. All you’ll probably need to do is center the particles at (0, 0), make them travel slowly outward (you can fine-tune the movement with an onUpdate function, if you really need to) and rotate the vent’s ‘content’ group, and Corona will take care of the actual positioning.

  • C

Sorry for the delay; if you post in the CBEffects forum, I’ll get a notification immediately.

It sounds like the main difficulty with what you need to do is with rotating particles around an axis. That’s a slightly advanced topic, but Corona makes it pretty easy with groups. All you’ll probably need to do is center the particles at (0, 0), make them travel slowly outward (you can fine-tune the movement with an onUpdate function, if you really need to) and rotate the vent’s ‘content’ group, and Corona will take care of the actual positioning.

  • C