From d092f3e1dc1c322a0c3c1e55b9b6e1792d6b0f59 Mon Sep 17 00:00:00 2001 From: "Jonathan \"Geenz\" Goodman" Date: Mon, 25 Sep 2023 12:18:02 -0700 Subject: Get the average normal of the face. DRTVWR-583 --- indra/newview/llheroprobemanager.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llheroprobemanager.cpp') diff --git a/indra/newview/llheroprobemanager.cpp b/indra/newview/llheroprobemanager.cpp index 687ebbf168..c3d7ce6e76 100644 --- a/indra/newview/llheroprobemanager.cpp +++ b/indra/newview/llheroprobemanager.cpp @@ -118,11 +118,20 @@ void LLHeroProbeManager::update() F32 angleInRadians = 180 * DEG_TO_RAD; LLMatrix4 rotationMatrix; + + rotationMatrix.rotate(angleInRadians, LLVector4(mNearestHero->mDrawable->getFace(0)->getAverageNormal())); LLVector3 translatedPoint; LLVector3 rotatedTranslatedPoint; LLVector3 rotatedPoint; + translatedPoint = camera_pos - hero_pos; + rotatedTranslatedPoint = translatedPoint * rotationMatrix; + rotatedPoint = rotatedTranslatedPoint + hero_pos; + + probe_pos.load3(rotatedPoint.mV); + + /* switch (mNearestHero->mirrorPlacementMode()) { case 0: @@ -161,6 +170,7 @@ void LLHeroProbeManager::update() probe_pos.load3(rotatedPoint.mV); break; } + */ } mHeroProbeStrength = 1; -- cgit v1.2.3