How to get a ball through/in a hole?

Hello,

Maybe its a stoopid question but i gonna ask.
How do i get a ball in/trough a hole?

I made a cube aka floor, flatten and stretched it. subvidue… and removed a face to create a hole.
collision bounds: convex hull, physics static.
The ball is a sphere, rigidbody, bounds set as sphere.
I launch the ball trough force (forwards and into the air) ball needs to get into the hole at the end (golf)

With this setup it wont work, the ball sits on top of the hole.
But when i set the bounds of the floor to triangle mesh it works, but if i hit the ball over the field it will go trough the floor.

To see what i mean here is a demo
golf_demo.blend (531 KB)

Does anyone know a solution for this?

Thank you,
Cotax

I had this problem too yesterday, but now i fixed it,try switching off collision bounds and if that didn’t work make it a static object too.

No, this is something that even the devs have been struggling with afaik.

Triangle Mesh is the only bounds setting that’d work. Have you tried disabling bounds altogether?

collision bounds: convex hull

That’s what’s causing it. Set it to triangle mesh.
If it falls throuh elsewhere, try increasing physics sub-steps or the collision margin.

I had some thoughts about this,

could we make a system ourselves, that detects when a object passes through another somehow?

push the object back to where it would have collided and somehow resimulate that physics step for that object?

maybe cast rays from the “front face” backward to where it hit the wall? and get the angle normal from that?

If it falls throuh elsewhere, try increasing physics sub-steps or the collision margin.

I incresed the substeps to 3, and reduced mass from 2.5 to 2.0, and i removed the collision bounds from the floor. It seems thats it works now. Thank you.

In my games I check 2-4 times a second if the floor is above the character using a ray. If it is, take the z location of the floor above and move the character a fixed distance above it. In a perfect world that wouldn’t be required, but it is very useful for the occasional uncontrollable falling through the floor.

If your character is falling through the floor, then probably there’s something wrong with your setup.

Fast moving objects+ triangle mesh ground = eventually problems

Read the last line of my post again. I’ve fallen through the floor of every MMO that I’ve played. I’m keen to hear how you manage to avoid the problem completely in your projects.

wrong window