Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: lioncirth on December 24, 2014, 07:08:46 AM

Title: AddForce issue
Post 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
Title: Re: AddForce issue
Post by: mdotstrange on December 30, 2014, 12:23:26 PM
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
Title: Re: AddForce issue
Post by: lioncirth on January 01, 2015, 11:12:52 AM
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 :)