Quote:Original post by Buckeye
The line aabbCollision==false appears to be comparing the address of the function to the value for false. Since the address of the function is greater than 0 and false is probably defined as 0, "aabbCollision==false" is always false and Forward never gets called.
Try calling the function:
if( !aabbCollision( Box, Box1 ) ) Forward(5);
I don't know what IDE you're using, but you need to learn how to debug by setting breakpoints in your code (as suggested), outputting messages to a debug window, etc.
Thankyou for the advice[highly appreciated], but whats causing the statements to always return true is a mystery to me at this moment[Debug:It breaks if the first condition is true with every other statement in the collision detection so something is wrong. I corrected my statement to the suggested line you gave above but no success.
The only thing I am unsure I maybe missed is updating the current positions of the AABB's relative to the current position of the objects in 3d space? For example, My objects are drawn in a certain location, will that mean AABB's are calculated but drawn to the exact same location or will no matter what they will be drawn to the same location as the object it relates to?<br><br>I do believe what I have shown you guys already is on the right track, but I'm no expert which is why I brought my issue to you guys. <br><br>I don't want to irritate people on this forum, but I'm struggling to see what I'm missing or incorrectly doing. [3d] One static object and one dynamic object moving with the camera's movement, when hit they have a collision, for this example I'm testing, the user can no longer move forward if that is the case. <br><br>I have examined the Axis-Aligned BoundingBox articles related to C++ etc, found a few books online showing similar construction, it's not that I have done lack of research on this topic, as I'm beginning to find it quite frustrating as to why it's giving undesired result. <br><br><br>