All code necessary to replicate is there. Please let me know if you need further info. Thanks. [import]uid: 31262 topic_id: 24093 reply_id: 324093[/import]
You can test it very simply by hitting that link in the first post and creating those 2 files emitter.lua and main.lua. Then just run main.lua in the simulator. [import]uid: 31262 topic_id: 24093 reply_id: 98713[/import]
Did you file a bug for this? If so, you should have gotten an email with a number in it.
If you didn’t actually file a bug for whatever reason, would you be so kind as to do that now, please? (Using link in top right.) [import]uid: 52491 topic_id: 24093 reply_id: 98722[/import]
Hi Walter, thanks for the reply. Sorry for my ignorance here but does this mean this a bug in the emitter.lua code or is this a bug in Corona? [import]uid: 31262 topic_id: 24093 reply_id: 108484[/import]
Funny that this thread got active. I have been fighting this issue again on my second game, not using emitter.lua, (blaming Corona, of course! lol) and just before jumping off a building, I believe I’ve figured out how the NaN was being produced… again…
I was attempting to normalize a zero length vector… again…
watch out for the sqrt’s !
[import]uid: 21331 topic_id: 24093 reply_id: 108523[/import]
Walter did you get a working version of that emitter.lua? If so could you supply it? Also, if it is a bug in the code how come it works in older versions? Did the graphical changes just make the bugs come to light? Thanks for looking into this. [import]uid: 31262 topic_id: 24093 reply_id: 108591[/import]
Sorry, I don’t have a working version handy anymore.
We introduced offscreen culling as an optimization recently. However, emitter.lua was intermittently setting object x,y positions to bogus values (sqrt of a negative number if I recall correctly). Those bogus values caused Corona to think the object was offscreen, hence the flickering.
Previously, we were much more lax about bogus values coming in. We’ll be much more stringent about that moving forward, so it’s very important not to pass in NaN values into Corona! [import]uid: 26 topic_id: 24093 reply_id: 108707[/import]
@Walter Thanks for the explanation. I have recently purchased particle candy anyways so I will test with particle candy. I’m sure it won’t happen with particle candy or else it would have been reported already. [import]uid: 31262 topic_id: 24093 reply_id: 108748[/import]