What's the best way to code my golf ball bouncing off hard surfaces when I'm using Code (CSharp): golfBall.AddForce(playerTransform.forward * ballSpeed * Time.deltaTime * 1000); At the moment I'm just using the phys materials and rigidbody components on the ball for the bounce. The bounce looks very stale. Any ideas on what to try? Thanks.
First off, I'm guessing your AddForce line is intended to be the "shot" force, which happens once when the ball is fired. For forces that are added only on a single frame, you don't need to multiply by deltaTime. As well, you'll want to use ForceMode.Impulse. So instead use: Code (csharp): golfBall.AddForce(playerTransform.forward * ballSpeed, ForceMode.Impulse); Second off, how big is the ball? Golf balls are ~50 mm in diameter. Unity's units don't revolve around any set system, but gravity is set to -9.81, which means really big objects look like they're falling slowly.
I have the mass set to 0.3. The scales is 0.4, 0.4, 0,4. I have made the drag 0.06 and the bounce is looking better but the ball hops once the speed is increased.