In my mini golf game, i have it so when you choose how much power your gonna use to putt the ball, it sets the speed of the balls bounce ball movement to the amount of power you use. But the problem is, when I do that, the deacceleration of the bounce ball movement doesn't work. Can anybody tell me how to fix this or how to do a custom bounce ball movement so it can deaccelerat?
if the speed goes below 0 it will speed up to 100 again, subtract from it only if the speed is greater than 0. And also make sure it isn't continually setting the speed to to the power counter, use "one action when event loops" or set the power counter to 0 after you hit the ball.
It didn't work. Instead of only setting a continous speed of the ball, can I subract from the speed of the ball?(TGF) I thought if i made it so every .10 of a second it will subrtract 1 from the speed of the ball.
But i have to know how to subtract from the speed.
Assuming Alterable Value A = Friction coefficient...
Every ____ seconds, speed -> speed - (AV A)*speed
If speed < 0, set speed -> 0
Set AV A to whatever number you want, but below 1 (around 0.2 or so, depending on how fast you want it to be). Or set it as a global value, counter, etc.
Disclaimer: Any sarcasm in my posts will not be mentioned as that would ruin the purpose. It is assumed that the reader is intelligent enough to tell the difference between what is sarcasm and what is not.