Frustum culling difficulties

Started by nickbrickmaster, January 20, 2014, 17:19:14

Previous topic - Next topic

nickbrickmaster

I'm trying to implement frustum culling, following Lighthouse3D's geometric approach. http://www.lighthouse3d.com/tutorials/view-frustum-culling/
My problem is that some objects disappear if looked at from the wrong angle, e.g. my rotating Suzanne disappears if the right ear is facing +Z, and you can't get too close to the level or look at it from the top.

https://github.com/epicfacecreeper/Demigod/blob/master/src/main/java/net/cyberninjapiggy/demigod/graphics/FlyingCamera.java#L126 is where I calculate the frustum planes (calcPlane and the box check are farther down), https://github.com/epicfacecreeper/Demigod/blob/master/src/main/java/net/cyberninjapiggy/demigod/graphics/render/Render.java#L424 is where the bounding box is generated.

Thanks for any help you can give.