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
6
votes
2 answers

Trying to change the color of the particles emitted by my SKEmitterNode from WITHIN the code

I have an app where the user can edit an emitter node and take a screenshot to the photo library. In the settings where they can change stuff like the birthrate, angle, ect. I allow them to change the color of the emitter node. I am…
user3473834
  • 103
  • 1
  • 5
5
votes
1 answer

NSInvalidArgumentException in SpriteKit Swift

I have an app with a SpriteKit scene. But if I run it on iOS 10.0 I'll get some error: 2018-11-09 21:58:26.379 App[56426:2425030] -[SKEmitterNode scaleMode]: unrecognized selector sent to instance 0x7c27adf0 2018-11-09 21:58:26.387…
5
votes
1 answer

How to resize an SKEmitterNode?

I just wanted to do something that to me seems really simple, which is make an emitter into the entire background of a view... then I would want the view to be able to aspectFill and scale and so forth, allowing the emitter to look proper whatever I…
Dave Kliman
  • 441
  • 4
  • 17
5
votes
1 answer

SpriteKit SKEmitterNode targetNode crash EXC_BAD_ACCESS

The Context An SKEmitterNode is created from an sks file, and added as a child of some sprite. The targetNode of the emitter is set to some other node in the scene. func launch() { let emitterPath = NSBundle.mainBundle().pathForResource( …
Mazyod
  • 22,319
  • 10
  • 92
  • 157
5
votes
1 answer

Spritekit and OpenGL: smooth smoke trail

I want to achieve this effect in my Spritekit game where there is a smooth trail behind the character. See the trail behind the coin in jetpack joyride: And this trail behind the hero in Jupiter Jump: Or this super smooth trail behind the hero in…
Patrick Collins
  • 4,046
  • 3
  • 26
  • 29
5
votes
3 answers

Change direction of existing particles

I'm using SpriteKit's Particle Emitter system to construct a moving star field in the background with the player's ship in the center of the screen. When the player touches an area of the screen I calculate the angle and animate the player sprite…
Christopher
  • 1,635
  • 5
  • 19
  • 30
5
votes
3 answers

Individual particles and physics in Sprite Kit

I am a long time user of Stackoverflow but first post. My question is seemingly simple, is there a way to make particles from an emitter interact with the physics sprites in the scene? (For example, if I am using a particle for rain, and I want it…
5
votes
2 answers

How can I tell when a SKEmitterNode has reached its maximum particles?

When using a SKEmitterNode with a maximum particles set to a number the documentation says that it will stop generating particles. My question is, is there a way to tell that this has happened? I want to remove the particle emitter from the scene…
PricklyApps
  • 113
  • 6
4
votes
2 answers

SKEmitterNode not working when setting numParticlesToEmit to non-zero in Xcode?

There is no code to present since we're using Xcode to define the value for numParticlesToEmit for a SKEmitterNode. Specifically, we use the Maximum property next to the Birthrate property for the Emitter section. The Birthrate property is set to…
Crashalot
  • 33,605
  • 61
  • 269
  • 439
4
votes
3 answers

Particle emitter not showing over image (swift spritekit)

This is a pretty basic question (Im new with swift and spritekit). So anyway Im adding a particle emitter to a spritenode(call it ball) and adding the ball to my scene. This ball is on top of another spritenode that represents the background. When I…
Paul
  • 156
  • 9
4
votes
0 answers

Generate particles around the outline of a shape with SKEmitterNode

From the documentation I read, SKEmitterNode's particle field is rectangular and can be adjusted using particlePosition and particlePositionRange. If I want to have particles being emitted around a shape, like an outline of a circle, is there a way…
Will
  • 41
  • 1
4
votes
3 answers

Emitter not rotating with parent node

Code --> http://pastebin.com/W3DMYjXa I am tinkering with SpriteKit and I cannot seem to get an emitter node to rotate with my spaceship the way I would like. I watched the Apple Tech Talks Session where they described making a spaceship and using…
Weston
  • 1,481
  • 1
  • 11
  • 31
4
votes
2 answers

SKShapeNode with emiitter crashes with SKAction removeFromParent

I have an SKShapeNode with a child SKEmitterNode. I have attached an SKAction sequence where the last action is removeFromParent. The node behaves correctly without the emitter, doing it's action then removing itself. However, if the emitter is…
Zack
  • 1,201
  • 8
  • 21
3
votes
2 answers

iOS SpriteKit Emitter particle frequency

Is it possible to change how often a particle is emitted. For example, if I have one particle emitting, can I have it emit every 5 or 10 seconds? I searched the documentation, but could not find anything. Is there a workaround? I would like to do…
Joe
  • 355
  • 1
  • 10
3
votes
0 answers

Swift SpriteKit SKEmitter node color not correct when added to the scene

I made a particle system in the particle editor in Xcode and it came out like this. I set it up in my SpriteKit scene like this. emitter = SKEmitterNode(fileNamed: "Trail.sks")! emitter.particleColor = .red …
Repardeimaj
  • 401
  • 3
  • 15
1
2
3
10 11