Create a collision shape for the default terrain

This commit is contained in:
scrawl 2016-02-28 16:47:41 +01:00
parent 84e9d346ef
commit fc3de3302e

View file

@ -268,6 +268,13 @@ namespace MWWorld
mPhysics->addHeightField (data->mHeights, cell->getCell()->getGridX(), cell->getCell()->getGridY(), mPhysics->addHeightField (data->mHeights, cell->getCell()->getGridX(), cell->getCell()->getGridY(),
worldsize / (verts-1), verts); worldsize / (verts-1), verts);
} }
else
{
static std::vector<float> defaultHeight;
defaultHeight.resize(verts*verts, -2048.f);
mPhysics->addHeightField (&defaultHeight[0], cell->getCell()->getGridX(), cell->getCell()->getGridY(),
worldsize / (verts-1), verts);
}
} }
// register local scripts // register local scripts