I’ve just started using Panda3d and I must say it’s amazing for now!
I have an issue with PandAI.
My game generates a dynamic environment (i.e. it’s randomly generated and then I use GeoMipTerrain - not sure this is the smartest way as most of the environment is made of simple walls or floor but it works for now). Then I have an actor, say the panda,that is meant to follow me without going through the walls.
I cannot use the pathfinding algorithm as it requires a fixed environment (one needs to pass the mesh file). I’ve tried using pursue but the panda keeps going through the walls (I suppose there are too many).
Is there a known solution to my problem? Otherwise is there somewhere that describes what the format of the mesh file is? I think I should be able to generate it quite easily using python considering I only have floor + some vertical walls.
AI documentation involves creating a grid in 3D editors. However, a panda can very well generate a mesh on the fly. You will have to study the appropriate section.
Based on what data? , Theoretically, using a ray to collide with a territory, you can understand if this polygon is passable. Next, you need to use an algorithm similar to the CSV generator to create this file, but I did not think about it. I can’t say specific decisions about this, I need to look at what csv is.
The data I am using is simple: it’s an orthogonal grid, where each cell of the grid is either floor or wall. So the data is basically a 2D array of 0 (floor) and 1 (wall). And I want the AI to only be able to navigate through cells which are of type floor. I’ll do a bit more research on the format of the csv, I’ll come back here if I find something more.
Of course, this is a second order question, but the panda supports named polygons, you can easily set a name based on the normal. This should help to generate the SVG file.