i did a 3D collision function:
bool IsCollision3D(Position3D ObjectPosition1, Size3D ObjectSize1, Position3D ObjectPosition2, Size3D ObjectSize2) {
        return ((ObjectPosition1.X 
                    <= (ObjectPosition2.X + ObjectSize2.width)) 
                    && (((ObjectPosition1.X + ObjectSize1.width) 
                    >= ObjectPosition2.X) 
                    && ((ObjectPosition1.Y 
                    <= (ObjectPosition2.Y + ObjectSize2.height)) 
                    && (((ObjectPosition1.Y + ObjectSize1.height) 
                    >= ObjectPosition2.Y) 
                    && ((ObjectPosition1.Z 
                    <= (ObjectPosition2.Z + ObjectSize2.ZDepth)) 
                    && ((ObjectPosition1.Z + ObjectSize1.ZDepth) 
                    >= ObjectPosition2.Z))))));
is these function correct?
(ok... i'm using VB6 and not C... but these function was translated...)
sometimes can work and others don't.... maybe it's the parameters that i add it.. but i don't know...
so i need ask: is these function correct for get the 3D collision?