File tree Expand file tree Collapse file tree
AI/src/com/jme3/ai/navmesh Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ public void setEntityRadius(float entityRadius) {
5959 * @return the new position in the nearest cell
6060 */
6161 public Vector3f warp (Vector3f newPos ) {
62- Vector3f newPos2d = new Vector3f (newPos .x , 0 , newPos .z );
62+ Vector3f newPos2d = new Vector3f (newPos .x , newPos . y , newPos .z );
6363 currentCell = navMesh .findClosestCell (newPos2d );
6464 currentPos3d .set (navMesh .snapPointToCell (currentCell , newPos2d ));
6565 currentPos3d .setY (newPos .getY ());
@@ -75,7 +75,7 @@ public Vector3f warp(Vector3f newPos) {
7575 * @return the position in the cell
7676 */
7777 public Vector3f warpInside (Vector3f position ) {
78- Vector3f newPos2d = new Vector3f (position .x , 0 , position .z );
78+ Vector3f newPos2d = new Vector3f (position .x , position . y , position .z );
7979 Cell cell = navMesh .findClosestCell (newPos2d );
8080 position .set (navMesh .snapPointToCell (cell , newPos2d ));
8181 return position ;
You can’t perform that action at this time.
0 commit comments