Particle object not appearing
by Matthew Klundt · in iTorque 2D · 08/16/2009 (5:45 pm) · 8 replies
I'm having a strange problem with a t2dParticleEffect. It shows up just fine when testing, but on the device, it doesn't show up at all. I have included setUsesPhysics(true);
I have bounding boxes turned on, and the emitter's bounding box does not show up at all on the iPod.
Any suggestions?
I have bounding boxes turned on, and the emitter's bounding box does not show up at all on the iPod.
Any suggestions?
#2
I had looked at that entry, but I don't think that is my problem: I do have setUsesPhysics set to true.
I had the World Limits off before, and tried setting it to Null with a larger area, but had the same result of nothing showing up.
It just seems strange that the bounding box isn't there at all as though the object never got added to the scene.
08/17/2009 (12:31 am)
Thank you for the quick response.I had looked at that entry, but I don't think that is my problem: I do have setUsesPhysics set to true.
I had the World Limits off before, and tried setting it to Null with a larger area, but had the same result of nothing showing up.
It just seems strange that the bounding box isn't there at all as though the object never got added to the scene.
#3
I think the issue could be the second reply to that thread, about them simply not rendering. I know I once had an issue, that was a pain to first discover, with mounted aprticle emitters.
When the mounted objects went off screen (in fact they started off screen) they had their particle emitters, in effect, "switched off". This meant I never saw the particles on the device, only on my Mac build. Do a world limit check etc to test this and switch them on if necessary.
OR, and this is quick and hacky just to eliminate/confirm my hypothesis, call playeffect (or whatever the method name is, I'm not at my own machine currently to check) from onUpdate and if they show, then you have your problem discovered.
08/17/2009 (12:27 pm)
Sorry I should have been more detailed in what I said :)I think the issue could be the second reply to that thread, about them simply not rendering. I know I once had an issue, that was a pain to first discover, with mounted aprticle emitters.
When the mounted objects went off screen (in fact they started off screen) they had their particle emitters, in effect, "switched off". This meant I never saw the particles on the device, only on my Mac build. Do a world limit check etc to test this and switch them on if necessary.
OR, and this is quick and hacky just to eliminate/confirm my hypothesis, call playeffect (or whatever the method name is, I'm not at my own machine currently to check) from onUpdate and if they show, then you have your problem discovered.
#4
08/19/2009 (9:33 pm)
You were right. I did some further checking and the world limits were the problem. Thank you very much.
#5
Works great on the Mac and about 50% of the times on the phone. When I load a level it either works or doesn't , and if it does work it'l keep working for the most of the level.
My particle emitter is always created at position "0 0" and never travels out of the window. also , it is not mounted to any other object.
Can you guys suggest any debugging method?
08/27/2009 (12:11 pm)
I wonder if I have the same problem. my particles randomly work on and off and I can't figure out why. setUsesPhysics is set to true and also the worldLimit to NULL -200 -200 200 200 false. Works great on the Mac and about 50% of the times on the phone. When I load a level it either works or doesn't , and if it does work it'l keep working for the most of the level.
My particle emitter is always created at position "0 0" and never travels out of the window. also , it is not mounted to any other object.
Can you guys suggest any debugging method?
#6
To make a long story short, I commented out all the PUAP_OPTIMIZE stuff out of the t2dParticleEffect.cc and now it behaves exactly like the Mac :)
08/27/2009 (1:12 pm)
So I think I found the problem by looking at the bounding box of the effect. the emitter is set to "STOP" so even though I never explicitly moving it out of the screen window. it does disappear or at least the bounding box disappear when the effect is done. when I use "CYCLE" instead of "STOP" I never get this problem. off course, the particles also keep cycling which is not what I want. I want "STOP" with the ability to playeffect() when I need it.To make a long story short, I commented out all the PUAP_OPTIMIZE stuff out of the t2dParticleEffect.cc and now it behaves exactly like the Mac :)
#7
08/27/2009 (1:23 pm)
Hang on, what is the lifetime of your particle effect?
#8
08/27/2009 (1:27 pm)
2 ...in seconds that is.
Associate Craig Fortune
My first assumption