I have an endless world, so i shift rigidbodies silently as in your SlidingWorldDemo, call shiftAllObjects() before that too. I have a huge heightmap for the terrain, and i use generated terrain data (a simple 2d float array) for the hkpSampledHeightFieldShape. The broadphase size is +-2000.f, the heightmap size is +-8192.f. Everything works fine inside the +-2000.f area, around the origo. But if i try to castRay() outside of 2000.f area, the ray misses the heightmap, but works for everything else. Rigidbodies collide with the heightmap normally everywhere, i can walk on it with my rigidbody controller 1000 mile away from the origo, but no rays find any ground. The rays are not outside the broadphase.
The heightmap is the only rigidbody not shifted, because it should always be in the middle of the broadphase, instead i shift the heightmap data it uses.
TLDR:
What happens with a rigidbody when shiftAllObjects() called, but the body not moved with hkpRigidBody::getRigidMotion()::setPosition()?
It seems raycast starts missing it after shiftAllObjects() called with more than the broadphase size.
Should i try several smaller 'moving' heightmaps?