diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-01-05 18:13:33 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2015-01-05 18:13:33 -0500 |
commit | 07812106ed54d834a2cf0be28f312bbf0ad34a1d (patch) | |
tree | 93316f367aad47bbe4969dc93ed23dd4efe6e32d /indra/llcharacter | |
parent | 62ab044b1ac9f757be40f951436ff11419feffb4 (diff) |
Moved mHoverOffset to LLCharacter so it's accessible inside animations. Apply offset when constrained to ground.
Diffstat (limited to 'indra/llcharacter')
-rwxr-xr-x | indra/llcharacter/llcharacter.h | 2 | ||||
-rwxr-xr-x | indra/llcharacter/llkeyframemotion.cpp | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/indra/llcharacter/llcharacter.h b/indra/llcharacter/llcharacter.h index d4e3b76386..085b681854 100755 --- a/indra/llcharacter/llcharacter.h +++ b/indra/llcharacter/llcharacter.h @@ -261,6 +261,8 @@ public: static std::vector< LLCharacter* > sInstances; static BOOL sAllowInstancesChange ; //debug use + LLVector3 mHoverOffset; + protected: LLMotionController mMotionController; diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp index 22aa4f1d2f..89bec40323 100755 --- a/indra/llcharacter/llkeyframemotion.cpp +++ b/indra/llcharacter/llkeyframemotion.cpp @@ -984,6 +984,7 @@ void LLKeyframeMotion::applyConstraint(JointConstraint* constraint, F32 time, U8 { case CONSTRAINT_TARGET_TYPE_GROUND: target_pos = mCharacter->getPosAgentFromGlobal(constraint->mGroundPos); + target_pos += mCharacter->mHoverOffset; // LL_INFOS() << "Target Pos " << constraint->mGroundPos << " on " << mCharacter->findCollisionVolume(shared_data->mSourceConstraintVolume)->getName() << LL_ENDL; break; case CONSTRAINT_TARGET_TYPE_BODY: |