ContainerFindFirst - distance based?
by Steve Acaster · in Technical Issues · 05/13/2008 (10:01 am) · 3 replies
I was just wondering whether ContainerFindFirst bases the returning object on distance closest to the container's origin or on the objects' numerical ID value in the whole radius (e.g. ID1788 being a lower value than ID2746)?
About the author
One Bloke ... In His Bedroom ... Making Indie Games ...
#2
so this is probably returning the first object in the "first" bin which is in the container,
where "first" bin is in bin-order, which, yeah, is probably world-aligned.
05/13/2008 (7:45 pm)
The world has a grid of "bins" overlaid on it, which is used to dramatically speed up proximity searches,so this is probably returning the first object in the "first" bin which is in the container,
where "first" bin is in bin-order, which, yeah, is probably world-aligned.
#3
Cheers for the info.
05/14/2008 (6:44 am)
Ah, I see. I was hoping it would search out from the origin to detect closest first - and now I realise why it didn't have an exlude variable in the code like ContainerRayCast does. Best for me to search with InitContainerRadiusSearch, sort by VectorDist and add an exclude/ignore from the origin object, then.Cheers for the info.
Associate Steve Acaster
[YorkshireRifles.com]
But question solved, anyhow.