NonStaticGH / CPathHostProject

This is a space where I develop Customizable Pathfinding plugin for UE5. Later on, I will also include my Engineering Thesis and documentation.
57 stars 13 forks source link

TraceShapesByDepth adding incorrect TraceShapes #12

Open JJkedinca opened 5 months ago

JJkedinca commented 5 months ago

Hope this may be useful for anyone stumbling on this.

In the GenerateGraph function, if AgentSize is > CurrSize, The agent shape is appended to the list of shapes that will be queried. However, in the following switch statement, there are no break statements in the case clause. This causes extra shapes to be added to the array when they are unneeded.

Adding a break after each case should fix the issue and net some perf gains.

StDanger commented 5 months ago

Thanks for finding that, will include it when updating to 5.4