summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2017-09-13 18:21:31 +0100
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2017-09-13 18:21:31 +0100
commit7839f77071e8e66ebd890a3bea40c6b6c9a8cfff (patch)
treed76f5aa65e81bf245027fc6e11cca0436eb6c40f /indra
parent6bf5c172a62ff045b6076960de6b498e2d7009fd (diff)
SL-718 - more transform tweaking for animesh, still some issues with attachments.
Diffstat (limited to 'indra')
-rw-r--r--indra/newview/llcontrolavatar.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/indra/newview/llcontrolavatar.cpp b/indra/newview/llcontrolavatar.cpp
index fa578907c8..7a8d5bce03 100644
--- a/indra/newview/llcontrolavatar.cpp
+++ b/indra/newview/llcontrolavatar.cpp
@@ -77,9 +77,19 @@ void LLControlAvatar::matchVolumeTransform()
{
LLViewerJointAttachment *attach = attached_av->getTargetAttachmentPoint(mRootVolp);
setPositionAgent(mRootVolp->getRenderPosition());
- LLVector3 pos = attach->getParent()->getWorldPosition();
- mRoot->setWorldPosition(pos);
- mRoot->setRotation(attach->getParent()->getWorldRotation());
+ // AXON why doesn't attach joint have a valid world
+ // position? Using the parent as a kludge but not
+ // right.
+ //LLQuaternion fix_axes_rot(-F_PI_BY_TWO, LLVector3(0,0,1));
+ LLVector3 joint_pos = attach->getParent()->getWorldPosition();
+ LLQuaternion joint_rot = attach->getParent()->getWorldRotation();
+ //LLVector3 attach_pos = mRootVolp->mDrawable->getPosition();
+ //attach_pos.rotVec(joint_rot);
+ //LLQuaternion attach_rot = mRootVolp->mDrawable->getRotation();
+ //mRoot->setWorldPosition(joint_pos + attach_pos);
+ //mRoot->setWorldRotation(joint_rot * (attach_rot * ~fix_axes_rot));
+ mRoot->setWorldPosition(joint_pos);
+ mRoot->setWorldRotation(joint_rot);
}
else
{