Playmaker Forum
PlayMaker Help & Tips => PlayMaker Help => Topic started by: lioncirth on December 24, 2014, 07:08:46 AM
-
Hi
I am working on an element of my game where fireballs shoot from the ground upwards and then despawn after 1 second.
It works fine in that I have them spawn, shoot up and then despawn. Issue I am facing is over time the amount of force seems to decrease, the first fireball shoots up and then gradually it shoots up less - Any idea why since it should be spawning a new version each time...
Thanks
-
Are you using a pooling solution? seems so as you say "spawn" and "despawn" instead of create/destroy
If so you have to reset all the physics on the objects- there are some posts about it here that helped me get it working correctly if you searching for pooling
You have to zero out the force and torque- I also set kinematic to on then off before spawning
-
Thanks a lot!
Will see if I can find the info :)
Would use create/destroy to save time but not the best way to optimize I suppose lol :)