Possible typo in GetAsBoundsArray() from AABBTree.h

was trying to optimize our AsyncApplyParticlePendingData() as it is taking to much and noticed this.

bool GetAsBoundsArray(TArray<TAABB<T, 3>>& AllBounds, int32 NodeIdx, int32 ParentNode, TAABB<T, 3>& Bounds) { if (Nodes[NodeIdx].bLeaf) { AllBounds.Add(Bounds); return false; } else { GetAsBoundsArray(AllBounds, Nodes[NodeIdx].ChildrenNodes[0], NodeIdx, Nodes[NodeIdx].ChildrenBounds[0]); // ---> this line also accesses ChildrenBounds[0] GetAsBoundsArray(AllBounds, Nodes[NodeIdx].ChildrenNodes[1], NodeIdx, Nodes[NodeIdx].ChildrenBounds[0]); } return true; }

Steps to Reproduce

Hi Sergii,

Thank you for the report. This does indeed seem to be a typo, based on the implementation of other similarly recursive functions in this file. Note that this particular function has not been touched since 2019 and that it is not currently in use by the engine (it might be available just as a debugging aid), so I’m not sure if verifying this will be prioritized by the engine devs anytime soon (the fix is quick and simple enough, though). Here is the public bug tracker link: UE-308038.

Best regards,

Vitor

Yes, I noticed it is not being used, but just wanted to let know.