Gravity keeps pulling ball down even though raycast detects ground

Hey, making my own ball physics and for some reason the gravity is still pulling the ball down even after the ball has been touched the ground I dont know why?

My code

Video of the issue

Clamp the velocity to zero if its very small e.g. < 0.001

1 Like

Hm, alright I’ll try that thank you

edit: yeah it didnt work sadly

Maybe try removing the * deltaTime at line 10