skemitternode

Specify random particle start colour with no animated change?

我只是一个虾纸丫 提交于 2019-12-05 07:43:42
Is there a way to have particles spawn with a random per particle colour based on the current "Color Ramp"? The particles do not change colour over their lifespan, they are simply assigned a colour from somewhere along the "Color Ramp" at birth and keep that colour until they die. The result of this would be a mix of particles at birth with blend colours from RED through to BLUE. In my tests I only seem to be able to get the behaviour where particles spawn as RED and then gradually turn to BLUE as the approach the bottom of the screen. John Riselvato Well, It looks like you can't use a

Slowing down particles of an SKEmitterNode

二次信任 提交于 2019-12-05 06:20:53
问题 I was just curious, is there a way to slowdown particle emitting along the other objects in the scene. Say you have one particle emitter, and one sprite. Sprite is moved using SKAction . An emitter is emitting. Both nodes are added to the scene. If you set self.speed to 0.5, only the sprite will slow down. Emitters will continue emitting at the same speed. Is there a way to slowdown in some other way than using particleSpeed property, because that will change the behaviour of an emitter. My

Slowing down particles of an SKEmitterNode

假装没事ソ 提交于 2019-12-03 20:42:29
I was just curious, is there a way to slowdown particle emitting along the other objects in the scene. Say you have one particle emitter, and one sprite. Sprite is moved using SKAction . An emitter is emitting. Both nodes are added to the scene. If you set self.speed to 0.5, only the sprite will slow down. Emitters will continue emitting at the same speed. Is there a way to slowdown in some other way than using particleSpeed property, because that will change the behaviour of an emitter. My question is inspired by this question: https://stackoverflow.com/a/41764180/3402095 Normally a

Spritekit and OpenGL: smooth smoke trail

。_饼干妹妹 提交于 2019-12-03 15:23:47
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 Ski Safari: This appears to be a standard feature in other game engines maybe? I think a spritekit particle emitter will only provide a blocky/stamped trail, not a smooth trail. Should I be using some kind of sprite custom shader? Any other inventive thoughts? Your question did not include a key issue which is the type of movement to be used. My

Duplicating a particle emitter effect in Sprite Kit

纵然是瞬间 提交于 2019-12-03 08:27:01
问题 I need to have a particle emitters effects to appear duplicated in 2 spots (For split screen purposes), I am wondering if anybody has come across a way of doing this. My goal is to have this running on iOS 10. Here is what I have tried so far. Assigning targetNode to an SKNode and then copying SKNode every frame: targetNode does not work in iOS 10 for me. Assigning the particle emitter to an SKNode , and using view.textureFromNode to make a texture to copy every frame : takes 1/120th of a

Duplicating a particle emitter effect in Sprite Kit

别说谁变了你拦得住时间么 提交于 2019-12-02 22:13:30
I need to have a particle emitters effects to appear duplicated in 2 spots (For split screen purposes), I am wondering if anybody has come across a way of doing this. My goal is to have this running on iOS 10. Here is what I have tried so far. Assigning targetNode to an SKNode and then copying SKNode every frame: targetNode does not work in iOS 10 for me. Assigning the particle emitter to an SKNode , and using view.textureFromNode to make a texture to copy every frame : takes 1/120th of a frame, too slow for me. Assigning a custom action to a particle node that duplicates the node into another

Unable to pause SKEmitterNode in iOS9

坚强是说给别人听的谎言 提交于 2019-11-30 03:30:59
I've tried few workarounds, but still I can't pause existing particles on iOS9 . I am using following technique to pause the scene: pause the scene with self.paused = YES; set custom globalPause = YES; variable to control update: method execution (because update: still runs while scene is paused). The point is that I don't pause the view, but rather the scene. I don't pause the view, because of this . Here is the code which can reproduce this issue on iOS9 : #import "GameScene.h" @interface GameScene () @property (nonatomic, strong)SKEmitterNode *emitter; @end @implementation GameScene -(void

Making a particle follow a path in spriteKit

。_饼干妹妹 提交于 2019-11-29 23:10:47
I have created a particle and when I test it moving on Xcode's property window, it looks like this: I have added this particle to a scene, made a circle and forced the particle to run that circle using this: NSString *myParticlePath = [[NSBundle mainBundle] pathForResource:@"particle" ofType:@"sks"]; SKEmitterNode *myParticle = [NSKeyedUnarchiver unarchiveObjectWithFile:myParticlePath]; [self addChild:myParticle]; CGPathRef circle = CGPathCreateWithEllipseInRect(CGRectMake(0,0,400,400), NULL); SKAction *followTrack = [SKAction followPath:circle asOffset:NO orientToPath:YES duration:1.0];

Unable to pause SKEmitterNode in iOS9

吃可爱长大的小学妹 提交于 2019-11-29 00:35:50
问题 I've tried few workarounds, but still I can't pause existing particles on iOS9 . I am using following technique to pause the scene: pause the scene with self.paused = YES; set custom globalPause = YES; variable to control update: method execution (because update: still runs while scene is paused). The point is that I don't pause the view, but rather the scene. I don't pause the view, because of this. Here is the code which can reproduce this issue on iOS9 : #import "GameScene.h" @interface

SKEmitterNode isn't removing itself from parent?

China☆狼群 提交于 2019-11-28 05:50:28
问题 I added SKEmitterNode as a childNode of my mainScene and than expected that It would be removed when particleLifetime ends, described like apple docs. Added emitters like this; var emitterPath : String = NSBundle.mainBundle().pathForResource("ShipFire", ofType: "sks")! var emitter : SKEmitterNode = NSKeyedUnarchiver.unarchiveObjectWithFile(emitterPath) as! SKEmitterNode emitter.position = position emitter.particleLifetime = 0.1; self.addChild(emitter) My SKEmitterNode properties like image