Why swept sphere radius is smaller than the mesh?

I want to apologize beforehand if this question sounds stupid, but I couldn’t find an answer to my question.
As per what I read from googling, the swept sphere radius should be lower than the radius of sphere mesh. For example:

if the radius is 1, then we set:
setCcdSweptSphereRadius(0.2f);

What is the reason behind this? Shouldn’t the swept shape have the same radius as the sphere?

That is, if the radius is 1, then we set:
setCcdSweptSphereRadius(1.0f);

It has to be embedded inside the object:

http://www.bulletphysics.org/mediawiki-1.5.8/index.php?title=Anti_tunneling_by_Motion_Clamping

2 Likes

So, we have to just pick any arbitrary radius but just ensure it is smaller than the mesh radius? Say, 0.8f.

It will activate if your objects velocity exceeds the given threshold. So as I understand it, it will create a kind of scaled ghost inside your object. Your object moves, your ghost lags a frame behind. And if the ghost and your object collide within one frame, it is activated.

This is used for things like shooting small bullets at big objects. The bullet travels so fast, it goes straight through your (usually very thin) wall.

This setting checks for a movement threshold. And if activated, will check for your collision.

2 Likes