[SOLVED]intersectsWith strange behaviour
Posted: Fri Oct 07, 2011 1:15 pm
I have the following code:
but it does not work correctly. As is the cube is always invisible. Commenting it out allows the cube to remain visisble. Negating the check allows the cube to remain visible until the camera moves. What am I missing here?
Code: Select all
//detect a collision with the camera
if(camera->getTransformedBoundingBox().intersectsWithBox(
cubeOne->getTransformedBoundingBox()))
{//set cube invisible if intersecting with camera
cubeOne->setVisible(false);
}