From c1a44d462e39c84a6af187ed14c6c8beee3140da Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Fri, 6 Apr 2018 12:15:08 +0000 Subject: MAINT-8479 Acount for possibility of agent's position above ground being below agent's pelvis --- indra/newview/llagent.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/newview/llagent.cpp') diff --git a/indra/newview/llagent.cpp b/indra/newview/llagent.cpp index 2243cbdf5a..901294d6b4 100644 --- a/indra/newview/llagent.cpp +++ b/indra/newview/llagent.cpp @@ -1580,6 +1580,8 @@ void LLAgent::setAutoPilotTargetGlobal(const LLVector3d &target_global) LLViewerObject *obj; LLWorld::getInstance()->resolveStepHeightGlobal(NULL, target_global, traceEndPt, targetOnGround, groundNorm, &obj); + // Note: this might malfunction for sitting agent, since pelvis stays same, but agent's position becomes lower + // But for autopilot to work we assume that agent is standing and ready to go. F64 target_height = llmax((F64)gAgentAvatarp->getPelvisToFoot(), target_global.mdV[VZ] - targetOnGround.mdV[VZ]); // clamp z value of target to minimum height above ground -- cgit v1.2.3