Title says it, triing to rotate (180 deg) a simple hkpSampledHeightFieldShape for a huge cave. X and Z coordinates work as expected - the heightmap is mirrored for X and Z axis. But the heightmap 'bumps' still pointing to +y not downward (-y). My heightmap code works for normal orientation, but not for upside down. Some code for the rigidbody:
hkpRigidBodyCinfo rci; rci.m_motionType = hkpMotion::MOTION_FIXED; rci.m_rotation.setFromEulerAngles(PI,0.f,0.f); rci.m_position.set(Position.x+size.x,Position.y,Position.z+size.z); // rci.m_position.set(Position.x-size.x,Position.y,Position.z-size.z); // for not rotated - works as expected rci.m_shape = pHimap->pHimapShape; // creating RB pHimapBody = new hkpRigidBody( rci );
For the shape:
hkpSampledHeightFieldBaseCinfo ci; ci.m_xRes = SizeX; ci.m_zRes = SizeZ; ci.m_scale = hkVector4(GridSize,1.f,GridSize); pHimapShape = new CphxHeightfieldShape(ci,HimapData.Array); // CphxHeightfieldShape is from hkpSampledHeightFieldShape


