My Simple attempt and the issues it causes when trying to get the ball to rotate realistically with the game in regards to spinning.
What I did: In the ball material I enable friction by inputting a number other than zero. This works great in regards to getting the ball to spin the way i want it to spin.
Problem I’m having: Friction is affecting the velocity of the ball, not just the rotation. I do not want this. The spinning is great but the ball slows down over time.
What I tried to resolve the problem: I attempted to use very low numbers for friction and attempted to compensate for the apparent “drag” in velocity by increasing bounce. for instance. Friction = 0.1 Bounce = 1.1 . This almost seems to work perfectly except in instances when there is a lot of bouncing happening - the velocity increases exponentially. In the RigidBody2D inspector, i have linear and Angular Drag set to zero so my assumption is that adding friction will not have an effect on velocity but that doesn’t seem to be the case.
What I need: I need a way to clamp the ball’s velocity OR prevent friction from dampening the velocity. I simple do not understand Mathf.clamp enough to figure out how to do it properly.
I’d like to be able to adjust the clamping in the inspector which I can do with “public float bmaxX, bmaxY;” I just don’t even know where to begin defining the Mathf.clamp variable or statement.