Skip to content
Snippets Groups Projects
Commit 7839f770 authored by Brad Payne (Vir Linden)'s avatar Brad Payne (Vir Linden)
Browse files

SL-718 - more transform tweaking for animesh, still some issues with attachments.

parent 6bf5c172
No related branches found
No related tags found
No related merge requests found
...@@ -77,9 +77,19 @@ void LLControlAvatar::matchVolumeTransform() ...@@ -77,9 +77,19 @@ void LLControlAvatar::matchVolumeTransform()
{ {
LLViewerJointAttachment *attach = attached_av->getTargetAttachmentPoint(mRootVolp); LLViewerJointAttachment *attach = attached_av->getTargetAttachmentPoint(mRootVolp);
setPositionAgent(mRootVolp->getRenderPosition()); setPositionAgent(mRootVolp->getRenderPosition());
LLVector3 pos = attach->getParent()->getWorldPosition(); // AXON why doesn't attach joint have a valid world
mRoot->setWorldPosition(pos); // position? Using the parent as a kludge but not
mRoot->setRotation(attach->getParent()->getWorldRotation()); // 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 else
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment