2

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: "ToothExplosion") {
            explosion.particleColor = SKColor.whiteColor()
            explosion.particleColorBlendFactor = 1.0;
            explosion.particleColorSequence = nil;
            explosion.position = contactPoint
            addChild(explosion)
        }
Luke Morse
  • 395
  • 2
  • 12

2 Answers2

2

Did you change the Particle Texture?

Try to put (in your sks file, ToothExplosion.sks) a solid circle, spark is not opaque:

enter image description here

Simone Pistecchia
  • 2,746
  • 3
  • 18
  • 30
  • No, he has his own texture he is using – Knight0fDragon Aug 29 '16 at 12:41
  • @Knight0fDragon I think you don't understand what Simone Pistecchia say: try to put a solid circle ( in other words perhaps your texture is not opaque). This probability could be true as you added in your answer below (Any other transparency is happening due to the texture) – Alessandro Ornano Aug 29 '16 at 13:21
  • He asked did the OP change the particular texture because spark is not opaque, and to use a solid color, to which you agree. This means that Simone Piestecchia missed the code where he is using his own texture, which means his question as an answer is already answered. This also means that we should assume that the OP is smart enough to not use a texture that has transparency, because it would be silly to ask SO this type of question if this was the case, so now this answer holds 0 value to the question at hand. – Knight0fDragon Aug 29 '16 at 13:26
  • @Knight0fDragon How do you know that he is using his own texture? – Simone Pistecchia Aug 29 '16 at 13:36
  • @SimonePistecchia look at his code, you know what, you are right, That is an SKS file, we have no idea what he is doing, do a small edit to this so that I may change my vote to neutral again – Knight0fDragon Aug 29 '16 at 13:37
  • Yes, I am already using my own texture, which I was certain was opaque by looking at it, but this made me take another look and it actually wasn't. Thanks so much! – Luke Morse Aug 29 '16 at 23:50
0

Set the particleAlpha start to 1 and the particleAlphaRange to 0. This will allow for the alpha to always be 1 without changing. Any other transparency is happening due to the texture.

Knight0fDragon
  • 16,609
  • 2
  • 23
  • 44