How do I manually change a sliding ball into a rolling ball?
Hi, I'm a little new to this so any help will be appreciated.
Context: I'm creating a simulated VR billiard game and trying to get the physics as realistic as possible. I have a cue ball being hit with a cue across a surface with accurate friction values.
Problem: The cue ball slides for longer than what it would slide in the real world. Realistically, when the velocity reaches 5/7th (~71%) of its initial velocity the ball transitions from sliding to rolling. However, in Unity, the transition happens much later at around 20-10% of the initial velocity. (this is due to how Unity calculates physics of interaction as a point of contact rather than an area of contact)
Question: I want to hard code it so that when the cue ball loses 5/7th of its initial velocity (at 71%*initial velocity), the sliding velocity is set to 0 and the cue ball continues to roll from it's angular velocity. Theoretically, is this possible? or will changing the velocity/speed to zero instantly stop the ball from moving in its place? And how do I go about doing this? Thanks in advance.
Answer by PatientVoid · Aug 28, 2020 at 06:11 PM
Answering my own question:
This should happen automatically but there was a default limit for 7 to the angular velocity. Refer to https://docs.unity3d.com/ScriptReference/Rigidbody-maxAngularVelocity.html for more details.