Page 1 of 1

After following the Objective-C tutorial (and converting to C++), this happened

Posted: Mon Feb 10, 2020 6:21 pm
by Starconstructor

Re: After following the Objective-C tutorial (and converting to C++), this happened

Posted: Tue Feb 11, 2020 5:14 pm
by drleviathan
I watched the video. What I saw: a dynamic box descended and bounce on the floor (which appeared to be thin mesh square). Upon hitting the floor a second time the box tunnelled through and continued falling.

Tunnelling... it is a known problem with physics simulations. There are a few ways to solve it for your case:

(1) Use a convex shape for the floor rather than a thin mesh. Make sure the vertical dimension of your convex shape is larger than 2X the max expected per-substep position change of your dynamic box.

(2) Enable continuous collision detection (CCD), and configure it properly, for the dynamic box.

(3) If you really must use a thin shape for the floor... take smaller substeps such that the box never moves more than 1/2 its smallest dimension at whatever it its maximum expected velocity.

Re: After following the Objective-C tutorial (and converting to C++), this happened

Posted: Mon Feb 17, 2020 4:52 pm
by Starconstructor
Great. What’s the terminology for other potential problems with physics, so I don’t have to come back?

Re: After following the Objective-C tutorial (and converting to C++), this happened

Posted: Tue Feb 18, 2020 5:30 pm
by drleviathan
Alas, that question is too broad. The answer spans entire textbooks on the subject. Best to come back when you have a specific issue or question.