From 57fd18b161c4a7298aeb4c768ecbcda9a4320bf0 Mon Sep 17 00:00:00 2001 From: scrawl Date: Wed, 15 Apr 2015 22:43:53 +0200 Subject: [PATCH] Fix frontface bug --- components/sceneutil/attach.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/sceneutil/attach.cpp b/components/sceneutil/attach.cpp index e06155a614..882bd66ece 100644 --- a/components/sceneutil/attach.cpp +++ b/components/sceneutil/attach.cpp @@ -172,7 +172,7 @@ namespace SceneUtil // However MW isn't doing this either, so don't. Assuming all meshes are using backface culling is more efficient. osg::FrontFace* frontFace = new osg::FrontFace; frontFace->setMode(osg::FrontFace::CLOCKWISE); - toAttach->getOrCreateStateSet()->setAttributeAndModes(frontFace, osg::StateAttribute::ON); + trans->getOrCreateStateSet()->setAttributeAndModes(frontFace, osg::StateAttribute::ON); find.mFoundNode->addChild(trans); trans->addChild(toAttach);