Rigidbody 3D Question - Part 2?

Godot Version

4.3

Question

Hello all,

Still learning about 3D stuff and I have another question about Rigidbody3D. I have a barrel that has a rigidbody, so, I can roll it about the room, I find that hilarious, but, then again I am a bit on the strange side, but I was working on the room design with assets looking for whitespaces between them and decided to hit the barrel for a bit of fun. Small minds are easily amused.

I hit the barrel up against another object and then I went right through the barrel thusly:

You can see the clipping of the barrel as I went through. Now this only happens when the barrel is hard against a wall or object. But, I don’t know why this behaviour is happening. It’s mot important (yet), but, would like to understand why, this might become important later.

Any quick explanation would be appreciated, just quick mind, I am sweltering from the heat here and a detailed explanation might melt my mind completely.

Thankyou and Regards.

It kind of all depends on your player implementation.

Physics collisions have a number of layers and optimizations to check and act on colliding bodies. When you have a character body(?) as the player your movement interval could jump past some of these layers/checks in the collision system allowing you to clip through a surface.

To mitigate these you need to use the physics appropriate APIs for the type of player you create. You can also adjust aspects of the collision detection like, collision margins, shapes and sizes.

2 Likes

Aha, now that makes complete sense! I bet that is what happening! I have an idea in mind on how I might deal with that, but, I need to learn more about 3D before I can implement it.

Thankyou for giving me these avenues to check out :sunglasses:.

Many thanks.