mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-20 21:53:52 +00:00
Enable skeleton-based bounding boxes added in Ogre 1.10
This commit is contained in:
parent
254eba350e
commit
07a9b7623a
1 changed files with 8 additions and 0 deletions
|
@ -607,6 +607,14 @@ class NIFObjectLoader
|
|||
NIFMeshLoader::createMesh(name, fullname, group, shape->recIndex);
|
||||
|
||||
Ogre::Entity *entity = sceneMgr->createEntity(fullname);
|
||||
|
||||
#if OGRE_VERSION >= (1 << 16 | 10 << 8 | 0)
|
||||
// Enable skeleton-based bounding boxes. With the static bounding box,
|
||||
// the animation may cause parts to go outside the box and cause culling problems.
|
||||
if (entity->hasSkeleton())
|
||||
entity->setUpdateBoundingBoxFromSkeleton(true);
|
||||
#endif
|
||||
|
||||
entity->setVisible(!(flags&Nif::NiNode::Flag_Hidden));
|
||||
|
||||
scene->mEntities.push_back(entity);
|
||||
|
|
Loading…
Reference in a new issue