On Fri, Sep 18, 2015 at 5:02 AM, Netanel M. <[email protected]> wrote:
> Hi everyone, > > I wanted to ask, how can I draw a particle system where a sprite resides > every frame? > I have a simple platformer with pymunk physics. I created a bunch of > particle systems, but when I set their pos_var attribute, > pos_var is the position variance, which controls how much the initial position for a particle will differ from the particle system position. To place a particle system you use the position attribute, like any CocosNode. Example: see test_particle_sun.py > it creates new particles all the way randomly from 0,0, to pos_var[0], > pos_var[1]. > What I want to do, is draw the particle system where the sprite is, and > should the sprite change its position, the particle system will create new > particles from the new location of the sprite. > obviously calling an update() function every frame with a schedule setting > pos_var to sprite.position doesn't work. > The update should modify 'position' on the particle system, not 'pos_var' > So how can I implement this? > -- > -- You received this message because you are subscribed to the Google Groups "cocos2d discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cocos-discuss. For more options, visit https://groups.google.com/d/optout.
