Hello everyone.
Please help me if you any know following these problems.
I have been developing the Golf game for several days.
If the golf ball’s speed were faster ,Golf ball couldn’t collision Mesh collider. So i wanna solving this problem.
Please tell me as soon as possible.
Thank you.
Are you using continuous dynamic collisions?
If that doesn't solve the problem, you might want to look at writing your own physics engine, or using Physics.Linecast between your previous position and the current position to augment the inbuilt one (it'll catch anything the usual physics misses). I'm assuming that this is a result of the typical 'bullet through paper' physics simulation glitch, not something more complex.
You'll need to save your previousPosition at the end of every FixedUpdate, so that you can use it in the next one.
RaycastHit hit;
if(Physics.Linecast(previousPosition, transform.position, out hit))
{
rigidbody.velocity = Vector3.Reflect(rigidbody.velocity, hit.normal);
Vector3 positionOffset = transform.position - hit.point;
positionOffset = Vector3.Reflect(positionOffset, hit.normal);
rigidbody.position = hit.point + positionOffset;
}