152153154155156157158159160161162
float goalx = _idleGoalX; float goaly = _idleGoalY; float goalz = 0; HLocatable goal = getGoal(target, app); if(goal != null) { goalx = goal.x(); goaly = goal.y(); goalz = goal.z(); } // Get rotation that points towards the goal, plus easing