Detecting objects that fall inside a cone region

The scenario where i need to detect this is a ship scaner that scans a infinite cone region in front of the ship.

I know that collision detection can do this but is there a way to obtain the info of what objects are inside the conic region right away with a function call without having to mess with collision events?

You can create a LensNode for the front of your ship, and define the field of view as you like it (and you can use lensNode.showFrustum() to visualize the field of view for debugging).

Then you can call lensNode.isInView§ to ask if the p, a Point3, is within the frustum (which is kind of like a square cone).

To compute p from another node, you’ll have to get a relative point, like lensNP.getRelativePoint(object, Point3(0, 0, 0))