Issues with particles and camera

I’m having some issues with the particle emitters and the camera (which is perspective). There doesn’t seem to be much documentation so I’m having a bit of a hard time understanding why what I’m doing is wrong, but I’m clearly doing something wrong.

Sorry for the video quality and static sound, but here: https://www.youtube.com/watch?v=eDZL27jqbFo

You can see that the particles are not following the camera, and I don’t understand why.

local emitterParams = json.decode(emitterData) emitter = display.newEmitter(emitterParams) emitter.x = event.other.x emitter.y = event.other.y emitter:start() camera:add(emitter, 1)

https://github.com/ctmartinez1992/PachinkoRPG You can see the whole code here, I’m still pretty new to corona. I’m enjoying it, but I’m stumped on this one. I had no problems otherwise with the camera or the particles, but I don’t understand why I can’t just do this.

What I intend is that the particles stay on that lil barrel, but they are clearly fixed in a point in the camera.

Thanks for the help.

You need to insert the emitter to a display group to have it (and its particles) move with the rest of the group, e.g. group:insert( emitter ).

That perspective is a third party library and I am not familiar with it.

Thank you for your answer.

Ok, I think I have already tried something like that, but tonight when I’m at home, I will try it again and post feedback.

However, can you suggest me a better camera plugin. I confess that I like this perspective one, I have had no issue right until this point. Where I just can’t get emitters to obey the camera.

I’ve always just written my own “camera” functions when I’ve needed them, so I can’t recommend or comment on them. If that works for you and you like it, then keep on using it.