Broadphase Frustum Not Detecting Rigidbodies Accurately

Broadphase Frustum Not Detecting Rigidbodies Accurately


I've recently implemented the broadphase frustum culling from the packaged demos ( \\Demo\\Demos\\Physics\\Api\\Collide\\Broadphase\\Culling ).

The frustum rotates in tune with the viewing direction just fine and seems perfect in the Havok VDB. I have things setup to record the m_id's of the bodies within the frustum. These bodies have game objects that are drawn, everything else is not drawn (thus culled).

The problem is, the culling in my game seems dependant on the cameras angle and rotation (as in it slides around too far, and objects stop drawing too soon ). This is confusing because in the VDB the the frustum rotates and translates just fine.

Here is my code:

Also, the frustum plane winding performed in the demo (CCW I belive)
leaves me with no collisions at all. I first expected the demo's
windings to work and I'm not sure why they do not. So as it stands now
the frustum's planes are facing inwards I believe.

Has anyone experienced this before? Thanks for the help.

2 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

I didn't look too heavily in to your code, but from your description and a glance at the code it sounds like your problem is just in the frustum plane generation. In particular I'd guess that your far plane is probably not wide/far enough, resulting in narrower frustum and objects being culled too early. Otherwise your use of Havok all looks solid.

Cheers and good luck,

Leave a Comment

Please sign in to add a comment. Not a member? Join today