Playmaker Forum

PlayMaker Help & Tips => PlayMaker Help => Topic started by: crush on June 24, 2015, 01:40:43 PM

Title: Add Explosion Force Falloff Question
Post by: crush on June 24, 2015, 01:40:43 PM
Hi,
I have a 3rd person character run towards a ball, using mouse button down to go to the next state to then add explosion force to "kick" the ball.
It works perfectly the first time. Then I chase after the ball,
The second time it works only slightly and then the 3rd time and after that no reaction at all. Not sure why this is happening?

I have tested with all different settings, different physics materials also for all surfaces and meshes, used add force, explosion, add explosion force etc.. still same result with each combination. A gradual decrease in the power of the force.

Maybe there is another way to do this also?
Thanks for any help.
Title: Re: Add Explosion Force Falloff Question
Post by: phannDOTde on June 24, 2015, 01:52:00 PM
Maybe you are adding the force from the scenes Centerpoint and as the ball moves away from that point it doesn't get affected anymore? Just a wild guess :-)
Title: Re: Add Explosion Force Falloff Question
Post by: crush on June 24, 2015, 02:04:49 PM
Hey, yes I was thinking the same thing also. I couldn't find a way / option to set the ball as the center point, use it's transform. also tried adding the force on the player and also on the ball and combinations of both etc all with the same results.
Title: Re: Add Explosion Force Falloff Question
Post by: phannDOTde on June 25, 2015, 06:15:12 AM
You can use the contactpoint or the position of an "dummy" gameobject you could put at the foot as an reference for "Add Force". Using "position AND dir Vector
Title: Re: Add Explosion Force Falloff Question
Post by: terri on June 25, 2015, 09:13:20 AM
Set a GameObject variable as the ball and add force to that?

Like this (I guess you'd have the 150 at the Z so it goes forward)
Title: Re: Add Explosion Force Falloff Question
Post by: phannDOTde on June 25, 2015, 02:02:57 PM
try position 0,0,0 because now the force is applied from the worlds center if I'm not mistaken - or use "get position" first to figure out where the balls position in the world is
Title: Re: Add Explosion Force Falloff Question
Post by: crush on June 30, 2015, 07:55:04 PM
Hey, thank you guys for the help, this worked perfectly for some things I was trying to do.