Sign in to follow this  
amerigo14

AABB transforming

Recommended Posts

Hi I've managed to implement a bounding box using Assimp and opengl by finding the smallest and highest x,y,z position, and these are shown correctly. However, I have attempted to update the boxes by finding all corners and multiplying it by the object's transformation matrix, and then finding the minimum and maximum x, y, z values of these corners. But when I try this I get really small values that are too small to be detected for collisions. I have checked the multiplication of the vector and the matrix but everything seems okay, is there something I'm missing?

Share this post


Link to post
Share on other sites
I managed to work out what was wrong after creating a box and printing results to the screen. Basically, each time the render function was being called the transformation matrix was multiplying each corner over and over, making the boxes move further away constantly. I fixed it by setting a start minimum and maximum and setting these first when updating. Thanks for the advice!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this