Hey guys i got a problem, i got an object with an attached character controller. However when i let the character drop down on a box he stops just before he hits the box.
This is where i define my character controller:
dbPhyMakeBoxCharacterController(
NinjagObject->ModelID,
dbObjectPositionX(NinjagObject->ModelID),
dbObjectPositionY(NinjagObject->ModelID)+dbObjectSizeY(NinjagObject->ModelID)/2,
dbObjectPositionZ(NinjagObject->ModelID),
dbObjectSizeX(NinjagObject->ModelID),
dbObjectSizeY(NinjagObject->ModelID),
dbObjectSizeZ(NinjagObject->ModelID),1,1,45.0);
And this is where i define the rigid body box:
int Ground = GetNextObjectID();
dbMakeObjectBox(Ground,10,1,10);
dbPhyMakeRigidBodyStaticBox(Ground);
I attached an image of the object with a drawn collision mesh box created by this code:
int cube = GetNextObjectID();
dbMakeObjectBox(cube,dbObjectSizeX(NinjagObject->ModelID),
dbObjectSizeY(NinjagObject->ModelID),
dbObjectSizeZ(NinjagObject->ModelID));
dbPositionObject(cube,dbObjectPositionX(NinjagObject->ModelID),
dbObjectPositionY(NinjagObject->ModelID)+dbObjectSizeY(NinjagObject->ModelID)/2,
dbObjectPositionZ(NinjagObject->ModelID));
dbSetObjectWireframe(cube, 1);