Flags are changed to game specific flags, but never reset after build causing the recast debug draw to be incorrect. Reset area flags to fix this issue.
Regression was caused in commit f95eb13ab30c78c03c38aa20492389d0fdf39a7f. The m_tileSize member was moved to the base class as this allows us to run the navmesh type selector in the base class which is subclassed by all the other 3 editors. The member wasn't removed from the tilemesh editor class causing it to shadow the base class one.
Renamed them to brushes, and renamed the ground brush to clip to be more consistent with the naming convention of the tools used for Source Engine and this particular game.
Factor should be 100, as 512x512 tiles with only 4 verts in Titanfall navmeshes are 5242, ours are twice as large +1. Our tiles are also 512x512 for small to medium navmeshes, and this constant results in nearly identical values, it was still off with 1 (5243 vs 5242).
Probing another poly in a Titanfall 2 navmesh, resulted in a polygon surface area of 1152.0, quantized by 100 is 11.52, the value stored in the Titanfall 2 navmesh was 11 so the value needs to be floored.
The values are now identical between custom and original navmeshes.
It was unclear whether this was for toggling all details at once, or showing toggled details on all crowds. It was the latter, improved checkbox naming.
The height couldn't be found on some edge case scenarios (typically complex geometry), but in these cases the height was still set to (unsigned short)-1, causing it to return a height very far into positive Z. The vert would therefore appears very far into the sky. This patch fixes this problem.
Move common code to Editor_Common and fix solomesh. Solomesh is useful for debugging recast as it allows for generating everything in 1 tile. Also did numerous fixes for the tilecache code, though this is still broken and won't be really used for the r5sdk project, but its nice to have for a potential project outside r5sdk that uses the xyz coordination system, which avoids having to run the navmesh through a conversion pass in runtime.
This was initially implemented to work around a normal flipping bug caused by the BSP to OBJ converter script, and the way Blender exports assets (it flips the axis on export). Removed code as we should instead use the fixed scripts and properly export the adjusted models from the DCC tools.
Caused by the implementation of dtNavMesh::isGoalPolyReachable. when this was false, everything was reset, including the start polyref causing "Set Random End" to always fail. isGoalPolyReachable also wasn't supposed to be checked on every mode, e.g. the neighbourhood or poly circle mode doesn't rely on a goal polyref.
Commit 11a827d54805b605a2500b4f6f13b8237bfffffd fixes 'dtNavMeshQuery::findRandomPoint' and 'dtNavMeshQuery::findRandomPointAroundCircle' never returning a poly as the vert indexing was inverted.
Although random positions are returned now, they are always either on a tile border, or a poly triangle. This patch fixes the incorrect calculation of triangle area, and output position writing caused by a similar mixup of verts.
Instead of flipping them in dtNavMeshQuery::getPortalPoints, check them in the right order in dtNavMeshQuery::findStraightPath since other code depend on getPortalPoints's results not being flipped. Also fixed some types in comments.
ZY needs to be flipped for YZ, previously the function would never find a poly as the reservoir sampler always failed (polyArea was always a large negative number).
Also used flag approach for tilemesh rendering, previously you could only render one thing, or a hardcoded set of things at a time. Now you can toggle what you want to draw (e.g. the voxels and detail polys). Also moved all NavMesh drawing options to the NavMesh category instead of TileMesh, e.gm the BVTree drawing options. This patch also allows you to toggle the input mesh off separately from the NavMesh, which is useful for larger levels.
Use the drawlist wrapper instead of relying on ImGui windows (which didn't work to begin with). Also fixed all text colors that weren't converted from the previous library.