Vousk-prod. Posted July 1, 2016 Share Posted July 1, 2016 Hi everybody, When I use 2.5 beta, on some projects I get a frustumPlanes[p] is undefined error, in this method : The problem doesn't occur in 2.4 final. I think it first occured from commit 3afb8d05108e032c285136a216bf98cb718419da "Added camera.isInFrustum and camera.isCompletelyInFrustum" BoundingBox.IsCompletelyInFrustum = function (boundingVectors, frustumPlanes) { for (var p = 0; p < 6; p++) { for (var i = 0; i < 8; i++) { if (frustumPlanes[p].dotCoordinate(boundingVectors[i]) < 0) { return false; } } } return true; }; For now I didn't manage to figure out what the difference is between projects where this error occur and those where there is no problem. Quote Link to comment Share on other sites More sharing options...
Dal Posted July 1, 2016 Share Posted July 1, 2016 I was trying to use camera.isInFrustum today and found it was culling things which were actually still on the screen... not sure if that's related. I gave up using it for now without too much investigation. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 1, 2016 Share Posted July 1, 2016 Can you reproduce it in the playground? Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted July 7, 2016 Author Share Posted July 7, 2016 Nope, I cannot be able to reproduce it, it really occurs only on some projects. I noticed something else, maybe it's related, when we define an "empty mesh", eg. a mesh with no vertex at all, but declared as a mesh and not a abstract one (because it is produced from the blender exporter and not by hand), the iscompletlyInFrustum functions act strangely, as if the bounding box has a default size unrelated to the zero size of the mesh. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted July 7, 2016 Share Posted July 7, 2016 Let me know if you can reproduce it:) Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted September 1, 2016 Author Share Posted September 1, 2016 The frustumPlanes[p] is undefined error was simply related to a major change between 2.4 and 2.5 function signatures : AbstractMesh.prototype.isCompletelyInFrustum = function (frustumPlanes) for 2.5 AbstractMesh.prototype.isCompletelyInFrustum = function (camera) for 2.4 But Dal is right, camera.isInFrustum is culling things which are actually still on the screen, and same with abstractMesh.isInFrustum (but differently Maybe the camera's frustumPlanes are not correctly updated or something like that. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 2, 2016 Share Posted September 2, 2016 I can help you only if I can repro it Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.