summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rw-r--r--indra/newview/llfloatermodelpreview.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 73707ad2f1..1c73a6cb31 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1487,6 +1487,14 @@ void LLModelLoader::run()
//Most likely an error in the asset.
llwarns<<"Tried to apply joint position from .dae, but it did not exist in the avatar rig." << llendl;
}
+ //Reposition the avatars pelvis (avPos+offset)
+ //if ( !strcmp( (*jointIt).first.c_str(),"mPelvis" ) )
+ if ( lookingForJoint == "mPelvis" )
+ {
+ const LLVector3& pos = gAgentAvatarp->getCharacterPosition();
+ gAgentAvatarp->setPelvisOffset( true, jointTransform.getTranslation() );
+ gAgentAvatarp->setPosition( pos + jointTransform.getTranslation() );
+ }
}
}
}