16
Support / checkForCollisionEllipsoid() framerate drop
« on: October 08, 2011, 05:34:35 pm »
Basically I'm trying to increase the frame rate as much as possible.
I'm using checkForCollisionEllipsoid to collision check the main character but it's dropping the frame rate down from 60FPS+ to about 30-35 FPS, even when using the lowest recursionDepth of 1.
The checkForCollisionEllipsoid frame rate drops even when there are no COLLISION_CHECK_OTHERS objects nearby (they are visible though), does checkForCollisionEllipsoid do any object/mesh distance filtering before calculating using ellipsoid collision?
Perhaps the function could be modified to do a translation/boundingbox distance check before focusing on the ellipsoid precision.
The function seems to be based on the visibility of objects since the framerate dropped as soon as the objects were visible.
I tried using three checkForCollisionSpherical() checks which helped considerably, the frame rate was around 45-50FPS. However I would like to improve the FPS a bit more if possible
Perhaps a new checkForCollisionDualBox() function can be introduced that does dual-box calculations?
i.e. the function would parse two boxes, one large/main box to cover the main body, and another smaller box to cover the head and feet.
checkForCollisionDualBox(SimpleVector translation, SimpleVector box1size, SimpleVector box2size)
I'm using checkForCollisionEllipsoid to collision check the main character but it's dropping the frame rate down from 60FPS+ to about 30-35 FPS, even when using the lowest recursionDepth of 1.
The checkForCollisionEllipsoid frame rate drops even when there are no COLLISION_CHECK_OTHERS objects nearby (they are visible though), does checkForCollisionEllipsoid do any object/mesh distance filtering before calculating using ellipsoid collision?
Perhaps the function could be modified to do a translation/boundingbox distance check before focusing on the ellipsoid precision.
The function seems to be based on the visibility of objects since the framerate dropped as soon as the objects were visible.
I tried using three checkForCollisionSpherical() checks which helped considerably, the frame rate was around 45-50FPS. However I would like to improve the FPS a bit more if possible
Perhaps a new checkForCollisionDualBox() function can be introduced that does dual-box calculations?
i.e. the function would parse two boxes, one large/main box to cover the main body, and another smaller box to cover the head and feet.
checkForCollisionDualBox(SimpleVector translation, SimpleVector box1size, SimpleVector box2size)