jmflu
1
I am just trying to make a simple 2d golf ball move up in the air in an arc and land with having it roll for a second or two and then stop.
I am using uScript (a visual scripting extension) so I will post my screen shot explaining what I am trying to do.
At this point in goes up in the air, and rolls but I do not know how to stop it from rolling or if I am even going about this in the right manner.
Hopefully the screenshot is easy to read and thanks in advance for any help!
rigidbody.velocity = Vector3.zero;
rigidbody.angularVelocity = Vector3.zero;
jmflu
3
^^^ ahh thanks! What if I wanted to get it to gradually slow down at the end instead of abruptly stopping?
Raimi
4
I know nothing about uScript but I think you might need to look at Physics materials.
With a physics material you can control bounce and the amount of friction on the ball and it will slow to a realistic and natural stop.
hope this helps.