Not necessarily Away3D specific, but I’m trying to gather some input on your thoughts of how this might work.
First off, the specifics. It’s a game where users can place various objects around the map at random (similar to an old-school RTS, they pick an object and then place it on the map).
So for simple 2D path-finding, I’m used to pre-generating a pathfinding grid based on the predefined map, however in this situation there is no predefined map. It can change from minute to minute… So how do I generate the grid to do my pathfinding from? I was thinking I could create a blank grid then loop thru all of the objects in my scene, grab their mesh bounds and mark those off as non-traversable in my grid? The problem I see with that is that I have some objects that have overhangs (like a house with a porch) that the NPC should be able to walk under, but still avoid any walls (like the front door)...
Secondly, I was thinking it’d be cool to implement 3D pathfinding to help solve the problem above, as well as let NPC’s be able to “hop over” low objects like a small wall, or fence… But I’m not really sure what the best way to implement this is…
Any ideas?
—Rob