# Frustum culling only working at certain angles

So how I'm doing this is a little sketchy but I plan on changing it to either AABBs or spheres once I get it working. So the problem I'm having right now is that the frustum culling I've implemented is only working at certain angles and is not even close to accurate, personally I believe that the problem is at a calculation level. I am fairly new to 3D game development so I just whipped up this class fairly quickly based on some thread I read. My ViewFrustum class can be found here: https://www.dropbox.com/s/3b97bgcwoyh2oq8/ViewFrustum.java?dl=0

So all I'm doing outside this class is calling the update method from my renderer class and I have an ungodly amount of if statements checking if an entity's xyz is within the min and max xyz of the frustum (This is temporary).

So my main question is, am I calculating the frustum right or did I make any mistakes?

Values (when game starts, rotation matrix is a identity matrix) :

• centerNear: [134.49167, 7.3502045, -271.4365]
• centerFar : [134.49167, 7.3502045, -1170.7365]
• points[0-7] :
• [0] 2607.2214 1714.3507 -621.8992 1.0
• [1] -2338.238 1714.3507 -621.8992 1.0
• [2] 2607.2214 -899.70605 -1573.3379 1.0
• [3] -2338.238 -899.70605 -1573.3379 1.0
• [4] 136.4149 100.760254 -252.18294 1.0
• [5] 132.56844 100.760254 -252.18294 1.0
• [6] 136.4149 98.727104 -252.92294 1.0
• [7] 132.56844 98.727104 -252.92294 1.0
• It is difficult to take your ViewFrustum class, out of context, and simply "plug it in" to a compatible engine we happen to have handy. Would you please distill your dropbox entry into: "Here's example input: X. Here's the output: Y." We can easily "plug" the camera parameters into a couple of matrices and use a known-good frustum creation method to verify whether the frustums you create are correct or not. Then again, so could you. – Jon Mar 16 '16 at 0:12
• Jon, here is a link to the whole engine: github.com/Zormion/DiodeEngine3D – Genthorn Mar 16 '16 at 1:54
• The main classes of interest would be the 'ViewFrustum' and 'MasterRenderer' classes – Genthorn Mar 16 '16 at 1:58
• Jon, so I changed the rotation matrix to an identity matrix and when walking in an angle that seems -90 degrees from the original angle of the camera when spawned the culling works perfectly until a certain distance away where entities are stopped from rendering right in front of the camera. – Genthorn Mar 16 '16 at 2:43
• Within calculateFrustumVertices, using Identity rotation, please add to your question, the values of: centerNear, centerFar, and points[0-7] – Jon Mar 16 '16 at 2:50