Actually, possible bug regarding the RayCast function...
When raycasting, inside my callback function, if I try to access fixture.m_body.m_userdata.data, where fixture is the fixture passed as the first parameter to my callback, and data is a property of the userdata of the body (a property that I know to exist), the code crashes with this:
The strange thing is, tracing 'fixture.m_body.m_userdata' is indicating that my userdata object is indeed there (and is an instance of the correct class, which should have the data property), but then just changing the code to trace 'fixture.m_body.m_userdata.data' with no other changes causes the crash. So, I'm not sure what's going on here.
When raycasting, inside my callback function, if I try to access fixture.m_body.m_userdata.data, where fixture is the fixture passed as the first parameter to my callback, and data is a property of the userdata of the body (a property that I know to exist), the code crashes with this:
Code:
[Fault] exception, information=[object AlchemyExit]
Assertion failed: (0.0f <= lower && lower <= input.maxFraction), function RayCast, file ../Box2D/Collision/Shapes/b2PolygonShape.cpp, line 253.
Assertion failed: (0.0f <= lower && lower <= input.maxFraction), function RayCast, file ../Box2D/Collision/Shapes/b2PolygonShape.cpp, line 253.
The strange thing is, tracing 'fixture.m_body.m_userdata' is indicating that my userdata object is indeed there (and is an instance of the correct class, which should have the data property), but then just changing the code to trace 'fixture.m_body.m_userdata.data' with no other changes causes the crash. So, I'm not sure what's going on here.