RigidBody physics extremily inconsistent

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Favkis

My weapon rigid body falls though ground, and collision detection with it is ignored 90% of time.

In godot discord, #physics tab, search for "changing physics engine doesnt change anything somehow " and there would be video right above that message.

I iterate through all collision reports and prioretise sword hit, but it doesn’t matter because 90% of time sword is ignored. It’s not only sword’s problem, I have other rigid bodies and they fall through map 90% of time. Ragdolls work just fine for some reason though, they always collide and never fall through map.

All collision masks and layers are correct and I don’t ever change them. I do not turn off collision shapes. I do use continuous collision because otherwise weapons move too fast to get correct collision.

Please help, I’m struggling with this for weeks and see no way out of this issue, it’s either changing engine or writing my own physics so things wont fall through floor and would collide properly.

If I do time_scale to 0.33 nothing falls through map anymore.

All collisions iteration

:bust_in_silhouette: Reply From: bubbybumble

Something I discovered is that CSGCombiners with “use collision” set to true are VERY glitchy. I immediately had stuff clip through walls and the floor until I imported the same model as an actual mesh, and made a collision shape for it. Are you using a CSGCombiner?

What is CSGCombiner? Here’s my item structure:
enter image description here

I use simple box in CollisionShape as shape. It has 1 1 1 scale in transform.

I set up physics FPS to 120 and force FPS to 120 and not nothing falls through ground most of the time now, and collisions are great, again, most of the time. However if for example item lays on ground and ragdoll falls on it, item would go through ground, and sometimes if item is falling it still may go through ground.

Favkis | 2020-11-21 16:01

That’s odd, I have no idea why you would have to do that.
a CSGCombiner is just a node that lets you prototype meshes with CSG shapes. It has the option to act as both a mesh and a collision shape, which is where I had similar issues. I have no idea what your problem is. Are you moving the rigidbodies fast?

bubbybumble | 2020-11-21 16:09

kinda, here’s example of speeds https://www.youtube.com/watch?v=1PO8jEVDUyo

But even if I just spawn item in editor, there;s a great chance it’ll fall through ground by itself. First it collides with ground and then it rotates into it

Favkis | 2020-11-21 18:56

Check the collision box, maybe you didn’t set it to the right size, but instead only the mesh. Also, I’ve heard not to ever change the scale directly on a collider, but only change the extents in the shape property.

bubbybumble | 2020-11-22 16:36

:bust_in_silhouette: Reply From: stormreaver

I found rigid body collisions to be highly unreliable. I made a YouTube video to illustrate:

For that reason, I use kinematic bodies, and implement physics manually using move_and_collide. I find collisions to be way, way more reliable that way.