Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Particle Bug???

Author
Message
SMS
19
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: United States
Posted: 20th Dec 2011 08:51
Hi All...

I took the Particles Explosion Example that comes with AppGameKit and modified it a bit in a way that seems to have uncovered a bug... but I wanted to be sure.

I'm sending particles up to the right, and shortly after, a strong force reverses their direction.

It repeats.

The bug is that the particle system changes. I believe that each iteration of the explosion should look essentially the same, but you will notice that either the initial force is diminished, or the opposing force is kicking in earlier...

You will see that they go past the right side of the screen, but in just a few cycles don't come even close.

It would be great to have more eyes on this. Let me know what you think:

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 20th Dec 2011 10:20
What's happening is you are adding a new force each time you start a new set of particles off so the amount of force acting on that emitter is getting larger each time. Put that force before the loop and the effect remains constant.

SMS
19
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: United States
Posted: 21st Dec 2011 04:24
Ohhhhhhh! It's *ADD*particlesForce... they really mean it!

How does one go about resetting forces I wonder? I kinda wish that the command was SETparticleForce... othewise I can see it getting rather out of control.

Thanks for that insight...
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 21st Dec 2011 07:33 Edited at: 21st Dec 2011 09:48
You can reset the forces on a particle emitter then add new forces

EDIT: "ClearParticlesForces( ID )"

SMS
19
Years of Service
User Offline
Joined: 2nd Dec 2004
Location: United States
Posted: 22nd Dec 2011 07:07
I swear I looked for that

sigh.

Thanks!

Login to post a reply

Server time is: 2024-11-22 21:02:30
Your offset time is: 2024-11-22 21:02:30