Trouble with ray testing

Post Reply
lamxuyen
Posts: 3
Joined: Wed Sep 05, 2018 8:25 am

Trouble with ray testing

Post 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:
User avatar
drleviathan
Posts: 849
Joined: Tue Sep 30, 2014 6:03 pm
Location: San Francisco

Re: Trouble with ray testing

Post 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.
bram
Posts: 51
Joined: Sun Nov 23, 2008 4:43 pm

Re: Trouble with ray testing

Post 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.
Post Reply