Within a hkpWorld::castRay(...,hkpRayHitCollector&) call, I am getting the assert:
".\Shape\Convex\hkpConvexShape.cpp(31): [0x7f1735a0] Assert : 'cdBody.getShape() == this
inconsistent cdBody, shapePointer is wrong'"
in a call that looks like
pTriangleShape->castRayWithCollector(input, *pBody, *pClosestRayHitCollector);
with const hkpTriangleShape* pTriangleShape, const hkpCdBody* pBody, and hkpClosestRayHitCollector* pClosestRayHitCollector.
The cdBody has a custom shape myShape : public hkpTriSampledHeightFieldBvTreeShape,
which overrides ctors and dtor, both queryAabb methods, queryObb, castRayImpl, and castRayWithCollector.
The cdBody has shape key = -1 and parent = NULL, and is passed in to myShape::castRayWithCollector by hkpWorldRayCaster::addBroadPhaseHandle.
The assert occurs within hkpWorld::castRay(...,hkpRayHitCollector&), but not within hkpWorld::castRay(...,hkpWorldRayCastOutput&).
What could be causing this assert? Is the result continuing after the assert likely to be accurate? Is part of the implementation of myShape missing?
Thanks,
-Andy Karn


