I've been working with
bge and specifically the
KX_Camera class to check if points are within the viewing frustum, but even when points are clearly in the camera frustum, it returns false. I'm aware of the issue where the projection matrix of the
KX_Camera object are not updated on the first logic tick, so I had the associated Script Controller start with a delay of a few ticks. Even then, the points don't get detected correctly. Upon further inspection, the projection matrix doesn't seem to change. I've been beating my head against the wall trying to figure out why, but to no avail.
Here are some more details about what I'm doing to give some more insight:
- I'm not actually rendering anything with this code, I'm using bge and bpy to do some processing regarding points visible from certain poses in a model
- As the API states, I'm assuming the provided points are to be in the global coordinate system
- The delay in the Script Controller corresponds to logic ticks, as I've read from multiple places
- The camera frustum on the display is the same geometry/orientation/position as the the one on the 3D viewer
- The point (0,0,0) returns true, even though it is not in the camera frustum. The camera, as it is positioned now, is near the origin, but the frustum does not contain it.
I'd appreciate any help you can give.