From 07812106ed54d834a2cf0be28f312bbf0ad34a1d Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Mon, 5 Jan 2015 18:13:33 -0500 Subject: Moved mHoverOffset to LLCharacter so it's accessible inside animations. Apply offset when constrained to ground. --- indra/llcharacter/llcharacter.h | 2 ++ indra/llcharacter/llkeyframemotion.cpp | 1 + 2 files changed, 3 insertions(+) (limited to 'indra/llcharacter') 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: -- cgit v1.2.3