I’m trying to create a basic football game, but the ball rolls indefinitely across the ground. I’ve tried other solutions like changing the RotVelocity, but then it affects the traveling of the ball when it’s kicked. Lastly, I tried using AlignOrientation but it also seems unreliable because the ball slightly curves at the end of roll, and for some reason sometimes bugs out when kicked on certain screens, as the ball just doesn’t move at all for them.
Is there any clear simple way to just make friction/slowing down for a ball?
A simple way to add friction is to go to property’s, select your ball, go to part(In Property’s), find CustomPhysicalPropertys, Click the checkbox, find friction, change to desired value.
Please post your script. We can’t help if we don’t know how you are moving the ball.
If you applied a constant force and didn’t remove it then of course it’ll keep going.
How about using ApplyImpulse? It applies a quick force and then stops pushing.
And the other thing, how Dense is the ball? If you’ve got the density cranked up and use a lot of force to push it then it’ll have a lot of momentum.
I have an AngularVelocity in the ball to slow it down, but it’s still not efficient as the ball doesn’t rotate during the time it’s in the air + sometimes curves a bit at the end of its travel. Also I turned off customphysicalproperties cause it didn’t seem to do anything so the density is 0.7
It will curve because just like in the real world the ball doesn’t spin perfectly on only one axis while it’s travelling.
What is the Friction of the ball, and what is the friction of the surface it’s rolling on?
If I remember correctly (which I often don’t) I think setting an AngularVelocity to a Part is only a one time thing, and as soon as the Part reacts with something else then it changes.
Also, what do you have the AngularVelocity’s ActuatorRelativeTo set to? If it’s set to the Attachment in the ball then I don’t think it’s going to have an effect. Try setting it to World to see if that makes a difference.
The velocity is set relative to World. The problem is that the AngularVelocity, while it will slow down the ball properly, also stops the ball from spinning like how it would IRL if it was kicked
Rather than using AngularVelocity, try using LinearVelocity, as instead of slowing down the rotation of the ball, it will slowdown the x and z velocity while still allowing the ball to move freely at the start (and should hopefully not cause that curving issue that you saw)
Just make sure you only apply a force on the X and Z axis’!