code: public boolean movePosition(float[] npos, NavMeshQuery navquery, QueryFilter filter) {
          // Move along navmesh and update new position.
          Result<MoveAlongSurfaceResult> masResult = navquery.moveAlongSurface(m_path.get(0), m_pos, npos, filter);
          if (masResult.succeeded()) {
              m_path = mergeCorridorStartMoved(m_path, masResult.result.getVisited());
              // Adjust the position to stay on top of the navmesh.
              vCopy(m_pos, masResult.result.getResultPos());
              Result<Float> hr = navquery.getPolyHeight(m_path.get(0), masResult.result.getResultPos());
              if (hr.succeeded()) {
                  m_pos[1] = hr.result;
              }
              return true;
          }
          return false;
      }
docs: Moves the position from the current location to the desired location, adjusting the corridor as needed to reflect
  the change.
  
  Behavior:
  
  - The movement is constrained to the surface of the navigation mesh. - The corridor is automatically adjusted
  (shorted or lengthened) in order to remain valid. - The new position will be located in the adjusted corridor's
  first polygon.
  
  The expected use case is that the desired position will be 'near' the current corridor. What is considered 'near'
  depends on local polygon density, query search extents, etc.
  
  The resulting position will differ from the desired position if the desired position is not on the navigation
  mesh, or it can't be reached using a local search.
  
  @param npos
  The desired new position. [(x, y, z)]
  @param navquery
  The query object used to build the corridor.
  @param filter
  The filter to apply to the operation.