How far you can go with this, depends on whether the build is modifiable or not, and in the case of NO MOD builds, whether it contains things like doors or not. However, options for optimising builds include:
- Setting the attribute for the entire building to Static Obstacle (with the caveats around scripted elements such as doors) and then dropping a Walkable floor in place
- This will work for NO MOD builds that do not include any scripted moving elements such as doors as well as for modifiable buildings where the scripted moving elements have been unlinked
- Create independent linskets for floor areas to be set to Walkable (as described in the previous set of bullet points) and set the main structure to Static Obstacle (again, with the caveat related to doors and similar)
- Setting the entire house to Walkable (door, etc., caveat again noted) and then use Exclusion Volumes to define walls, etc.
Exclusion Volumes and Material Volumes
Exclusion Volumes can also be used within building to confine / control character movement. For example, in the image below, I’ve set a room where Charlie can roam around, but I don’t want him wandering through into the hallway, so I added an Exclusion Volume prim to prevent him from doing so. Without it, he would occasionally wander into the non-walkable hall and stall.
Material Volumes are useful in slowing a character down where required – such as in a confined space where you don’t want it bouncing madly off walls and furnishings. Simply drop in a transparent prim, set the pathfinding attribute to material volume and reduce the walk rate to a suitable value prior to applying and performing a region rebake.
Moving In and Out of Buildings
Pathfinding characters cannot open / close doors. So if you want to have a character to be capable of walking out onto a patio, there are a few things you’ll need to do:
- Make sure the walkable areas are contiguous between “indoors” and “outdoors”
- Make sure the doorway is unimpeded. The door should be open and any auto-close functionality turned off / disabled
- Make sure any “outdoor” areas are suitably bounded by Static Obstacles (walls, railings, etc.), to prevent your character wandering away or becoming stuck somewhere it shouldn’t be
- Make sure hazards such as swimming pools are suitably safeguarded to prevent characters falling in.
Things Noted During Tests
The following are issues I noted when setting-up buildings on my own build platform, within my home region and working at Sandbox Artifex. I’m not stating any of them are “faults” with pathfinding; they may simply be down to my failure to set elements up correctly, or as a result of issues that are entirely separate from pathfinding. They’re simply issues I came across (generally with some frequency) during my fiddling around.
- There appears to be a minimum space size for setting a character randomly roaming (although this could be an issue with the script I am using): Charlie refused to start roaming in any area of 10x10m or smaller; however, once in motion, he would happily roam in and out of confined spaces
- As noted earlier, setting the entire structure of a building to Walkable resulted in Charlie occasionally “falling out” of the building (a drop of around 0.75m) and then roaming around outside, unable to get back in
- Sharp drops between Walkable areas caused Charlie to stall. For example, in the image above, if Charlie fell off the left side of the patio area (a distance of 1.75m), he’d stall, despite the build platform below the house being Walkable
- Shallow steps don’t present an obstacle. In the image above, Charlie could negotiate the step up into the house from the patio and could descend / climb the steps leading to the build platform
- Exclusion Volumes do not appear to be efficient at halting a character; in the image above, Charlie repeatedly fell into the pool despite the Exclusion Volume surrounding and overlapping it. This occurred even after setting a Material Volume in place on the patio to slow Charlie down.
Pathfinding Q&A Thread
I missed this while playing with pathfinding at home and at Sandbox Artifex, but there is a Pathfinding Q&A thread on the forums wherein Falcon Linden addresses a number of questions, including making buildings walkable, and addresses some issues around mesh and pathfinding elements.