# Physics Simulation Forum

 All times are UTC

 Page 1 of 1 [ 2 posts ]
 Print view Previous topic | Next topic
Author Message
 Post subject: CCD ProblemPosted: Fri Jun 30, 2017 1:37 pm

Joined: Fri Jun 30, 2017 1:11 pm
Posts: 1
I read a lot about CCD in the last few hours, but still I can't figure out a way to prevent my game's items from falling through the walls or floors in my game.

From what I understand the CcdMotionThreshold is the delta movement which the rigid body needs to exceed in one simulation step, before CCD kicks in, right? And the CcdSweptSphereRadius is the radius of the sphere that is then used to check for possible collisions all along the movement vector of the object.

What I don't understand is: does the swept sphere have to be bigger than the actual object so it contains all of the object or does it need to be smaller than the actual object so that the CCD algorithm does not miss an interception with another object?

I also figured that if I set the CCD threshold to the size of the shortest dimension of the bounding box surrounding my object, then the CCD should (in theory) always kick in when it is actually possible for the object to tunnel through another object, right? My game is moddable, so the items in the game can have various sizes, so I need a formula to calculate the right values for CcdMotionThreshold and CcdSweptSphere.

Also, despite of my best affords I was unable to prevent some items from falling through the floor and walls. Even if I set the CCD threshold to a very small number (e.g. 1e-7), the objects sometimes fall through.

Top

 Post subject: Re: CCD ProblemPosted: Thu Jul 06, 2017 5:04 pm

Joined: Tue Sep 30, 2014 6:03 pm
Posts: 306
Location: San Francisco
I've used CCD. I set the proxy sphere to be smaller than the bounding box of the object: the diameter was about 3/4 of the average of the two smallest sides of the bounding box, or something like that.

The per-object CCD speed threshold was set to the diameter of the CCD proxy sphere divided by the fixed substep time.

Even with these settings sometimes objects could tunnel through others: in particular long thin objects tumbling on a btBvhTriangleMeshShape floor. For best results only use convex shapes for your floors.

Top

 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending
 Page 1 of 1 [ 2 posts ]

 All times are UTC

#### Who is online

Users browsing this forum: Bing [Bot] and 17 guests

 You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum

Search for:
 Jump to:  Select a forum ------------------ BULLET PHYSICS LIBRARY USERS    General Bullet Physics Support and Feedback    Release Announcements    Applications, Games, Demos or Movies using Bullet PHYSICS AUTHORING TOOLS, SERIALIZATION AND STANDARDS    Physics authoring tools, serialization, standards and related topics RESEARCH AND DEVELOPMENT IN COLLISION DETECTION & PHYSICS. Don't post Bullet support questions here!    Research and development discussion about Collision Detection and Physics Simulation    Links, Papers, Libraries, Demos, Movies, Comparisons       Non-technical forum and license/patent discussion    Career Opportunities