Possible bug in PenetrationDepth value?
Posted: Mon Mar 13, 2017 7:16 pm
Hi Norbo,
Thanks for your help getting up and running combining BEPU with Helix-3D Toolkit in WPF. I am having trouble getting reliable values back from the contactInfo.Contact.PenetrationDepth variable for determining collisions in non-realtime simulation with very tiny increments of coordinate values between colliding objects.
I want it to be possible for objects to be exactly side-by-side or stacked with no collision detection, down to the smallest possible floating point value for their relative sizes. But if any objects overlap by even the tiniest value, to detect this as a collision. I am not using either XNA or MonoGame so it is tricky to understand how I should be tweaking the engine to work the way I want it to.
Sometimes I am getting an extremely large value back from penetration depth, which makes me wonder if there is a bug in the way this double value is calculated. It seems to be "rounding the back", where a very tiny value suddenly becomes a very large positive value by flipping the mantissa. An example number I get back is
3.40282347E+38 which is actually 340,282,346,999,999,936,944,928,768,456,368,192,088 ... it cannot be a valid calculation!
Anyway, I am wondering if it is even possible to use this engine the way I hope to. I want to be able to make increments of maybe even 0.001 or 0.0001 of a unit and have the engine switch from no collision detected to collision detected.
Here's an example of a fairly irregular shape I would like to not require an unusually high epsilon value for, which in this case needs to be at 0.33 for the two pieces to fit together with no gap (visually). I am using the MobileMesh shape as it seems to be the best common denominator.
Is the engine simply not designed for such small positional deltas or is there anything more I can do to achieve the precision I am hoping for?
Thanks again.
Thanks for your help getting up and running combining BEPU with Helix-3D Toolkit in WPF. I am having trouble getting reliable values back from the contactInfo.Contact.PenetrationDepth variable for determining collisions in non-realtime simulation with very tiny increments of coordinate values between colliding objects.
I want it to be possible for objects to be exactly side-by-side or stacked with no collision detection, down to the smallest possible floating point value for their relative sizes. But if any objects overlap by even the tiniest value, to detect this as a collision. I am not using either XNA or MonoGame so it is tricky to understand how I should be tweaking the engine to work the way I want it to.
Sometimes I am getting an extremely large value back from penetration depth, which makes me wonder if there is a bug in the way this double value is calculated. It seems to be "rounding the back", where a very tiny value suddenly becomes a very large positive value by flipping the mantissa. An example number I get back is
3.40282347E+38 which is actually 340,282,346,999,999,936,944,928,768,456,368,192,088 ... it cannot be a valid calculation!
Anyway, I am wondering if it is even possible to use this engine the way I hope to. I want to be able to make increments of maybe even 0.001 or 0.0001 of a unit and have the engine switch from no collision detected to collision detected.
Here's an example of a fairly irregular shape I would like to not require an unusually high epsilon value for, which in this case needs to be at 0.33 for the two pieces to fit together with no gap (visually). I am using the MobileMesh shape as it seems to be the best common denominator.
Is the engine simply not designed for such small positional deltas or is there anything more I can do to achieve the precision I am hoping for?
Thanks again.