I cannot get camera collisions to work with actual objects - they keep colliding with the bounding boxes as opposed to the actual mesh. This is my code:
////////////////////////////////////////////////////////////
#include "DarkGDK.h"
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
dbLoadObject ("Basic House_1_Whole.3DS", 1);
dbPositionObject (1, 0.0f, 0.0f, 0.0f);
dbSetGlobalCollisionOn ();
dbPositionCamera (0.0f, 0.0f, 50.0f);
dbAutomaticCameraCollision ( 0, 0.01f, 1);
dbHideMouse ();
float fCameraAngleX = 0.0f;
float fCameraAngleY = 0.0f;
while ( LoopGDK ( ) )
{
fCameraAngleX = dbWrapValue ( fCameraAngleX + dbMouseMoveY ( ) * 0.4f );
fCameraAngleY = dbWrapValue ( fCameraAngleY + dbMouseMoveX ( ) * 0.4f );
dbXRotateCamera ( fCameraAngleX );
dbYRotateCamera ( fCameraAngleY );
if (dbKeyState (17) == 1)
{
dbMoveCamera (4.5f);
}
if (dbKeyState (31) == 1)
{
dbMoveCamera (-4.5f);
}
dbSync ( );
}
return;
}
Does anyone know how I can "remove" the bounding box from the object so the camera (and I assume other objects) will collide with the mesh itself?
Thanks,
SandShark
-What Signature?