branchrust_reboot/main/naval_update/navmeshsurface_optimcancel
16 Commits over 0 Days - ∞cph!
Clean: remove obsolete TODOs
Tests: none, trivial change
Clean: remove test code that offset the baked navmesh
Prepping to merge back
Tests: spawned all variations of ghostship, engaged scientists - didn't spot any weirdness
Bugfix: LimitedTurnNavAgent - when path following, ensure facing direction is applied in world space
Previously it was done in navmesh space, causing scientists to look in the sky during dogfight
Tests: observed scientists dogfighting and chasing behaviors - they either looked in direction of run or me
Add a tool to convert navmesh obstacles to modifier volumes, rebake all ghostship nav using volumes
Bugfix: Ensure NavAgent properly initialzied when trying to spawn on a detached navmesh
Tests: spawned ghost ship, AI started patrolling and running around to shoot me when spotted
Update all ship trigger parent shapes to match the ship
Bugfix: SpawnGroup now applies entitie's world<->navmesh transformations when picking a spawn point
Tests: Spawned ghostship - all NPCs spawned, but not moving (likely my other experimental code borks it)
Update: DynamicNavMesh allows to exclude specific navmesh source roots
- Ghostships register to be excluded, since they have their own baked navmesh
- [editor-only] Added logic to exclude all roots from the client scene
This CL also has some temp ghostship debug code (offsets navmesh to validate it)
Tests: in water world spawned a GhostShip and enabled AI - only backed navmesh popped into existence. AI didn't spawn - need to investigate next
Fix compile errors, re-enable navmesh obstacles on ships, disable navmesh surfaces on all the other ships
Update: Adopt Scientist2FSM to be aware of ghostship navmesh
Need to double check aiming logic (sometiems they aim at the sky), and investigate how initial on-navmesh spawning is done. Also need to convert variant FSMs
Tests: spawned ship navmesh offset and with a rotation. Ran around into different areas of the ship and rooms - they pursued
Update: introduce BaseEntity.ServerNavMeshPos property and use it instead of the methods
Incomplete work(need to expose transform matrices), will return after bugfixing
Tests: none
Update: LimitedTurnNavAgent sets npc's position via helper functions
- ScientistNPC2 overrides it to optionally map on to the detached navmesh if it's on a ghost ship
- LimitedTurnNavAgent uses navmesh positions to calculate steering to waypoint in FaceTarget mode (think it was the original intent anyway)
There's a bunch more code that needs to be converted just to be safe with strong waves
Tests: spawned ghost ship away from craggy, enabled AI, and ran around to different areas - scientist caught up, were able to shoot me
Update: GhostShip spawns navmesh instead of NavMeshSurface
- Disabled NavMeshSurface on GhostSHip prefab (will need to do it for the rest later)
This stops NavMeshSurface constrantly running add-remove navmesh every server frame. Need to figure out how to tie it to NPCs
Tests: visualzied navmesh in editor via gizmos, checked profiler to not see any more NavMeshSurface::UpdateActive calls