// Allow objects to go up to their radius underground. F32 LLWorld::getMinAllowedZ(LLViewerObject* object, const LLVector3d &global_pos) { F32 land_height = resolveLandHeightGlobal(global_pos); F32 radius = 0.5f * object->getScale().length(); return land_height - radius; }
F32 LLWorld::resolveLandHeightAgent(const LLVector3 &pos_agent) { LLVector3d pos_global = gAgent.getPosGlobalFromAgent(pos_agent); return resolveLandHeightGlobal(pos_global); }
// Allow objects to go up to their radius underground. F32 LLWorld::getMinAllowedZ(LLViewerObject* object) { F32 land_height = resolveLandHeightGlobal(object->getPositionGlobal()); F32 radius = 0.5f * object->getScale().length(); return land_height - radius; }