AI Libraries for Panda3D

ok new problem, I got the AI working but im not sure what im doing wrong. Ralph can normally move around my terrain just fine using setZ so i figured by making him walk by himself it should be the same but if he is no at 0 height he will fall over i am wondering if this is something to do with PandaAI or maybe my heightmap I generate (as it dosnt include height cause you said to overwrite height). I cannot seem to findout why he will fall when no on level terrain so any advice would be great.

Edit:
Never mind I figured what i did wrong in the code I made. I designed it for 0 on al z’s so as soon as i went and tried to go above that our code was fighting even though in your demo you overwrite both sets of Z coord’s apparetly this shouldnot have been done. that being said I am working on a fix to my code to work properly for 3d so that this issue dost happen again!