-1

I have a particle, and an image that is moving on the screen what I would like is that the emitter of the particle is the center of my image thus the particle always follow the image. How can I do this?

BenMorel
  • 34,448
  • 50
  • 182
  • 322
arvin Arabi
  • 253
  • 1
  • 7
  • 21

2 Answers2

0

If your using only the basic UIImageView for your animation then you might have to do it yourself (unless the is a magic function somewhere that I missed).

To do so I would suggest getting a few bitmaps representing a trail of stars and while you move your image you display these bitmaps in succession rotated in the right direction to give the illusion of particules falling of the image end

The other solution that would look wy cooler is if you use a library such as cocos2 that would allow you to display your images and create particules easily (but that will involve changing to an opengl environment ...

Hope it helps

Jason

Jason Rogers
  • 19,194
  • 27
  • 79
  • 112
0

set the particle location to UIImageView location..

like

emitter.position = imgView.position;

If you are going to use cocos2d,the same thing...

emitter.position = sprite.position;
Anish
  • 2,889
  • 1
  • 20
  • 45