mirror of
https://github.com/luanti-org/luanti.git
synced 2025-08-01 17:38:41 +00:00
Recalculate mesh normals for CAOs (#10000)
This commit is contained in:
parent
8fc9e7eb11
commit
fe1f72ab0a
3 changed files with 34 additions and 0 deletions
|
@ -726,6 +726,14 @@ void GenericCAO::addToScene(ITextureSource *tsrc)
|
|||
addAnimatedMeshSceneNode(mesh, m_matrixnode);
|
||||
m_animated_meshnode->grab();
|
||||
mesh->drop(); // The scene node took hold of it
|
||||
|
||||
if (!checkMeshNormals(mesh)) {
|
||||
infostream << "GenericCAO: recalculating normals for mesh "
|
||||
<< m_prop.mesh << std::endl;
|
||||
m_smgr->getMeshManipulator()->
|
||||
recalculateNormals(mesh, true, false);
|
||||
}
|
||||
|
||||
m_animated_meshnode->animateJoints(); // Needed for some animations
|
||||
m_animated_meshnode->setScale(m_prop.visual_size);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue