Page 1 of 1

Trouble with ray testing

Posted: Mon Dec 03, 2018 4:09 am
by lamxuyen
Hello,

I am trying to implement a player controllable character using a btRigidBody, and im having trouble with using ray testing to determine if the character can/cannot jump. The issue is that the following error appears when trying to perform the rayTest:
"Overflow in AABB, object removed from simulationIf you can reproduce this, please email bugs@continuousphysics.com
Please include above information, your Platform, version of OS.
Thanks."

The function for the ray testing is the following:

Re: Trouble with ray testing

Posted: Tue Dec 04, 2018 12:00 am
by drleviathan
In my experience that "Overflow in AABB, object removed from simulation" assert happens when NaN has been injected into the system. I've seen this happen in two ways: (a) dividing by zero somewhere or (b) every frame: using a transform to compute its new value and then neglecting to renormalize it.

Re: Trouble with ray testing

Posted: Fri Dec 07, 2018 2:57 am
by bram
Yeah, that sounds plausible, indeed.

If it's a NaN, you can catch them, right at the moment that they are generated, with:

Code: Select all

#include <fenv.h>
feenableexcept( FE_DIVBYZERO | FE_INVALID | FE_OVERFLOW );
or on windows:

Code: Select all

#pragma float_control( except, on )
...or use /fp:except compiler option.