Difference between revisions of "Navmesh Disabling"
Removed unnecessary renaming of navmesh, or using said name in script.
imported>JBurgess |
imported>Dbrigner (Removed unnecessary renaming of navmesh, or using said name in script.) |
||
Line 14: | Line 14: | ||
You’ll end up with something looking like Fig 1b: Blue edges mean ‘special’ navmesh portal. They only get created when you use this menu command. | You’ll end up with something looking like Fig 1b: Blue edges mean ‘special’ navmesh portal. They only get created when you use this menu command. | ||
The following two functions enable/disable a navmesh | |||
*'''EnableNavMesh''' '' | *'''EnableNavMesh''' ''NavmeshFormIDHere'' | ||
*'''DisableNavMesh''' '' | *'''DisableNavMesh''' ''NavmeshFormIDHere'' | ||
You CAN’T use ''' | You CAN’T use '''NavmeshFormIDHere.enable''', nor can you have activate parents, because Navmeshes are not references. | ||
You can go on to swap this navmesh with a replacement, if your situation calls for such. To start with, create the first navmesh like I described above Once you do, select a triangle on this new navmesh, as in Fig 1c. Now HIDE it. Hit H to hide a navmesh, Ctrl-H to unhide Navmeshes. Your workspace should look like Fig 1d. | You can go on to swap this navmesh with a replacement, if your situation calls for such. To start with, create the first navmesh like I described above Once you do, select a triangle on this new navmesh, as in Fig 1c. Now HIDE it. Hit H to hide a navmesh, Ctrl-H to unhide Navmeshes. Your workspace should look like Fig 1d. | ||
Line 31: | Line 31: | ||
Create more triangles for the new version (don’t worry about blue edges) as in Fig 2a. Repeat the steps above to select this new area and separate into its own navmesh, as in Fig 2b. | Create more triangles for the new version (don’t worry about blue edges) as in Fig 2a. Repeat the steps above to select this new area and separate into its own navmesh, as in Fig 2b. | ||
You’ll end up with this something like Fig 2c | You’ll end up with this something like Fig 2c. Hit Ctrl-H to unhide all Navmeshes, you should see the overlapping separate navmesh objects, as in fig 2d. | ||
Finalize and save. In the game, enable one navmesh and disable the other via script, using the commands above. Be sure that both navmesh objects are not enabled at the same time. | Finalize and save. In the game, enable one navmesh and disable the other via script, using the commands above. Be sure that both navmesh objects are not enabled at the same time. |