Search code examples
iosobjective-csprite-kitparticles

How to know if a sprite touched the particle emitter


i have a particle emitter of fire and i have an object. I want to know when does the object touches the fire. Any ideas? Thanks in advance.


Solution

  • calculateAccumulatedFrame is a method that returns the largest rectangle that includes all of the SKNodes children. This should be able to solve your problem

    BUT It might be better creating your own polygon which represents the area where all the particles are usually held and doing a test with that, It gives you more accuracy and gives u more control