Questions tagged [skemitternode]

A SKEmitterNode object is a node that automatically creates and renders small particle sprites. Particle sprites are privately owned by Sprite Kit—your game cannot access the generated sprites. For example, this means you cannot add physics shapes to particles. Emitter nodes are often used to create smoke, fire, sparks, and other particle effects. Available in iOS 7.0 and later.

155 questions
2
votes
3 answers

SpriteKit SKEmitterNode particleAction not working in Xcode 8 / iOS 10

I have an iOS 10 SpriteKit project where I'm trying to put actions on particles from a basic particle emitter created from the "snow" particle template in Xcode 8: let snowPath = Bundle.main.path(forResource: "Snow", ofType: "sks")! snowEmitter =…
Bjørn Olav Ruud
  • 1,458
  • 2
  • 13
  • 14
2
votes
2 answers

How can I make the particles in my SKEmitterNode opaque?

I've experimented a lot with the settings in the Particle Emitter editor, but none of them seem to allow me to actually make the particles completely opaque. I've also tried editing it in the actual code: if let explosion = SKEmitterNode(fileNamed:…
Luke Morse
  • 395
  • 2
  • 12
2
votes
1 answer

AVAudioPlayer returning nil after game has been running for a while

I'm current developing a small game where balloons float up from the bottom of the screen and the player has to pop them before they reach the top. Each balloon object contains a method to safely set up it's AVAudioPlayer's: func…
M. Stolte
  • 21
  • 2
2
votes
1 answer

swift how to add SKEmitterNode as a trail of smoke behind SKSpriteNode?

I'm trying to put a trail of smoke behind my spaceship. I have the smoketrail worked out as an emitterNode but I can't seem to attach the emitter to the spaceship. I can't figure out why this doesn't work. I.e. the emitter doesn't show up on screen…
user594883
  • 1,329
  • 2
  • 17
  • 36
2
votes
1 answer

Use a SKEmitterNode across multiple SKScenes

I have a new game I've just started building in sprite kit with swift and I'm wondering how I can use a SKEmitterNode seamlessly across multiple scenes. At the moment my game consists of 3 scenes: menu, game and game over. I want to use the…
jm1175
  • 165
  • 10
2
votes
1 answer

Correct way to use SKEmitterNode Programmatically

I am new to Spritekit. Just starting to make my 3rd-4th game. So I'd like to know what is the correct way to use SKEmitterNode programmatically. In particular what is the correct practice if I want to have multiple particles in my game - jet engine…
GeneCode
  • 7,545
  • 8
  • 50
  • 85
2
votes
1 answer

What exactly is SKEmitterNode particleLifetime?

The documentation for SKEmitterNode says that the particleLifetime property is: The average lifetime of a particle, in seconds. I am seeing something fishy in xcode 7.2.1, though. As I was trying to modify an explosion emitter, I expected that…
Thunk
  • 4,099
  • 7
  • 28
  • 47
2
votes
1 answer

Stop SKEmitterNode to emit particles

I have a SKEmitterNode and I'm trying to stop it when a button is pressed. I add my node in this way: let followLine = SKAction.followPath(border.CGPath, asOffset: false, orientToPath: true, duration: 2.0) let loopAction =…
BalestraPatrick
  • 9,944
  • 4
  • 30
  • 43
2
votes
2 answers

Custom Particle System for iOS

I want to create a particle system on iOS using sprite kit where I define the colour of each individual particle. As far as I can tell this isn't possible with the existing SKEmitterNode. It seems that best I can do is specify general behaviour. Is…
BenBtg
  • 836
  • 1
  • 9
  • 22
2
votes
1 answer

How to contain SKEmitterNode particles in parent Node?

I would like to add a SKEmitterNode to SKNode but have its particles stay inside the parent node's frame. Kinda like clipsToBounds property on UIView. Example: the particles from the emitter should not leave the black square SKSpriteNode:
Rehat
  • 89
  • 3
  • 5
2
votes
0 answers

SKEmitterNode particles clumping together on creation

I have an SKEmitterNode that is acting strange in different versions of iOS. If you look at the screenshot below, you will see that when my scene is loaded, the emitter I am using dumps an odd group of rain drops when the scene first loads. The…
jwade502
  • 898
  • 1
  • 9
  • 22
2
votes
1 answer

How to move emitter node to front?

Background's zPosition is 1 and emitter node's is 2. Still background is on front. I even tried higher numbers, but it won't help. Code SKSpriteNode *bg = [SKSpriteNode spriteNodeWithImageNamed:@"TiltToMove_BG"]; bg.size = self.size; bg.zPosition =…
Nielsapp
  • 302
  • 1
  • 11
2
votes
1 answer

SKFieldNode positioned wrong after iOS 9 update

I've some code that worked perfectly fine in iOS 8, however since iOS 9 a few SKFieldNodes behave very strangely. The image below shows a scene with two SKFieldNodes (marked with red sprites) and a SKEmitterNode emitting gold-ish particles. In iOS…
Double M
  • 1,449
  • 1
  • 12
  • 29
2
votes
1 answer

Particle Emitter not acting consistently

I'm using the same particle emitter in multiple scenes, and I'm noticing that in some scenes when I run the app on a phone that the emitter isn't appearing when its supposed to. It then changes to a different scene next time I open the app so it's…
JGrn84
  • 750
  • 1
  • 9
  • 26
2
votes
1 answer

SKEmitterNode particles lag at start

I'm playing around with SKEmitterNode in my own little game. I'm shooting a cannon ball and when the ball hits one of the boxes in the scene, the box gets destroyed and a particle effect with a simple texture "BOOM" is created to make a transition…
James Takarashy
  • 299
  • 2
  • 14