Simple viewer-side hack to adjust avatar position
parent
b021c90e7b
commit
2e0a8231d2
|
|
@ -654,6 +654,21 @@
|
|||
<key>Value</key>
|
||||
<integer>2</integer>
|
||||
</map>
|
||||
<key>AvatarPosFinalOffset</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
<string>After-everything-else fixup for avatar position.</string>
|
||||
<key>Persist</key>
|
||||
<integer>1</integer>
|
||||
<key>Type</key>
|
||||
<string>Vector3</string>
|
||||
<key>Value</key>
|
||||
<array>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
<real>0.0</real>
|
||||
</array>
|
||||
</map>
|
||||
<key>AvatarPickerURL</key>
|
||||
<map>
|
||||
<key>Comment</key>
|
||||
|
|
|
|||
|
|
@ -3412,9 +3412,11 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
|
|||
// correct for the fact that the pelvis is not necessarily the center
|
||||
// of the agent's physical representation
|
||||
root_pos.mdV[VZ] -= (0.5f * mBodySize.mV[VZ]) - mPelvisToFoot;
|
||||
root_pos += LLVector3d(gSavedSettings.getVector3("AvatarPosFinalOffset"));
|
||||
|
||||
LLVector3 newPosition = gAgent.getPosAgentFromGlobal(root_pos);
|
||||
|
||||
|
||||
if (newPosition != mRoot->getXform()->getWorldPosition())
|
||||
{
|
||||
mRoot->touch();
|
||||
|
|
@ -3580,7 +3582,9 @@ BOOL LLVOAvatar::updateCharacter(LLAgent &agent)
|
|||
}
|
||||
else if (mDrawable.notNull())
|
||||
{
|
||||
mRoot->setPosition(mDrawable->getPosition());
|
||||
LLVector3 pos = mDrawable->getPosition();
|
||||
pos += gSavedSettings.getVector3("AvatarPosFinalOffset");
|
||||
mRoot->setPosition(pos);
|
||||
mRoot->setRotation(mDrawable->getRotation());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue