#Finding the cone from something or someone's point of view?

5 messages · Page 1 of 1 (latest)

acoustic anchor
#

There is a method in the camera class that will return a Boolean representing whether an object is inside the view frustum or not

#

A naive implementation ( or a suitable one depending on the context ) may be just to loop through every instance in the map / workspace and use this method to test wherever it is in the view frustum or not.

#

Well the naive approach works, looping through every possible instance in workspace is a lot of work, especially as your game scales

#

so it might be best to invest in some sort of spatial partitioning algorithm to cut the amount of instances you need to check

#

You could also look into things like using a region3 which is fitted to the view frustum and grabbing all the parts in it as well