AI Libraries for Panda3D

Hi all,

Is anyone else using PandAI with Maya? I’ve followed the tutorial videos but the resulting navmesh.csv doesn’t seem to work. I always get the errors “couldnt find destination” and “couldnt find source.”

Here’s the sequence I used:

  1. Created a 60x60 plane centered at (0,0,0) in Maya 2009
  2. Under INPUTS->polyPlane1 (my plane) I changed the subdivision width and heights to 4 to give me a 4x4 grid
  3. Exported this plane as “env_full.egg” and verified it looked right in pview
  4. Selected three of the center faces and deleted them
  5. Exported this new plane as “env_col.egg” and verified it looked right in pview
  6. Ran C:\Panda3D-1.6.2\bin\egg-trans on BOTH “env_full.egg” and “env_col.egg” to create “env_full_tri.egg” and “env_col_tri.egg,” respectively
  7. Ran “meshgen env_full_tri.egg env_col_tri.egg” to create navmesh
  8. Swapped out my “env_col_tri.egg” and navmesh in the PandAI demo StaticObstacleDemo as a means to test it out. (Note: I repositioned ralph and the destination so that they were inside of my area at the start)

Both ralph and the arrow are definitely inside of the plane, but I get the source and destination errors mentioned above. Any ideas what I’m doing wrong?

Thanks for your help!

EDIT:
Well, I’ve tracked down the source of the problem. Here it is for others to learn from.

The navmesh.csv that’s being generated from my eggs appears to have swapped Length with Height and PosY with PosZ.

Sample:

Grid Size	3								
NULL	NodeType	GridX	GridY	Length	Width	Height	PosX	PosY	PosZ
0	0	0	0	4.44E-15	20	20	-20	-4.44E-15	20
1	1	0	0	0	0	0	0	0	0
1	1	0	0	0	0	0	0	0	0
1	1	0	0	0	0	0	0	0	0
1	1	0	0	0	0	0	0	0	0
1	1	0	0	0	0	0	0	0	0
0	1	1	0	4.44E-15	20	20	0	-4.44E-15	20

If I swap them by hand, then the navmesh works great.

Root cause:
I was using Maya in Y-Up instead of Z-Up coordinate system. Do’h.