![]() |
Object Collisions? |
Post Reply
|
Page <12 |
| Author | |
Giblet
Member
Joined: 2003 May 21 Online Status: Offline Posts: 441 |
Post Options
Quote Reply
Posted: 2012 Sep 10 at 6:18am |
Hi Remo, I didn't look at any example code or the GeColliderEngine stuff - he said he was interested in knowing how to do the simple Bounding Box test, so I took it on as an academic exercise (ie. just to see how I would do it). I'm not sure what a "proper AABBox class" is or where to find one, since I didn't look anything up. The MinMax class served the purpose I needed. As mentioned, I'm sure that there are other (perhaps even well-defined) methods of doing it (that even uses acronyms like OBB and AABB that help describe the method), but I just worked from scratch, so I'm unfamiliar with those terms :). Cheers. EDIT: Just so I don't look like a complete dolt, I just looked around and determined that 'AABB' likely stands for "Axis Aligned Bounding Boxes", which probably describes what I did. I'm also guessing that 'OBB' probably means "Oriented Bounding Boxes" (?). EDIT 2: Ok, it looks like what I'm technically doing is creating a OBB as the source for an AABB, as in the first few pages from here. Edited by Giblet - 2012 Sep 10 at 6:31am |
|
![]() |
|
kuroyume0161
Member
Joined: 2002 Oct 29 Location: United States Online Status: Offline Posts: 3201 |
Post Options
Quote Reply
Posted: 2012 Sep 11 at 5:49am |
|
Yes, your acronyms are correct. :)
This is why I was a bit scared of multiplying the bounds by the global matrix. They should stay in their proper orientation and just have their positions represented in global space - but I had to convince myself that they weren't being 'transformed' in any unexpected way. |
|
![]() |
|
Giblet
Member
Joined: 2003 May 21 Online Status: Offline Posts: 441 |
Post Options
Quote Reply
Posted: 2012 Sep 11 at 6:03am |
|
Gotcha :).
If you created a polygonal box object using those 8 transformed points I came up with, you'd end up with something similar to the yellow cube on the left-side of the "Figure 4" image on page 2 of that article I linked. I then use that (yellow, OBB box) cube to determine the new MinMax (blue, AABB box) extents. Obviously, that's more 'slop' than the right-side of that image, but you don't have to find and transform all the points of the mesh - just the 8 points of the bounding cube. Edited by Giblet - 2012 Sep 11 at 9:53am |
|
![]() |
|
Giblet
Member
Joined: 2003 May 21 Online Status: Offline Posts: 441 |
Post Options
Quote Reply
Posted: 2012 Sep 11 at 10:55am |
|
As usual, I got bored :) ...
Cheers. Edited by Giblet - 2012 Sep 11 at 10:58am |
|
![]() |
|
ScottA
Member
Joined: 2011 Jan 07 Online Status: Offline Posts: 1090 |
Post Options
Quote Reply
Posted: 2012 Sep 13 at 7:35am |
|
Sorry for not posting back guys.
My mother had a serious health issue this past weekend and I've been basically living at the hospital for the past few days. @Giblet. Thank you very much for not giving up on this and doing all the work you did on it. The collision class you made looks like it will be very good. I'm not really able to focus my mind on programming with my mother's health so bad. So it might be a while before I get back to it. I did test it out like this:
And it looks like it works good. But your class has a some other methods in it (init(),CollidesWith()) that I need to figure out how and when to call. I'll take a look at better look at when my mind is in better shape. Thanks a ton for all the work you've done on this. ![]() -ScottA |
|
![]() |
|
Giblet
Member
Joined: 2003 May 21 Online Status: Offline Posts: 441 |
Post Options
Quote Reply
Posted: 2012 Sep 13 at 2:33pm |
|
No problem.. there's an updated version of it at the bottom of this thread.
|
|
![]() |
|
Post Reply
|
Page <12 |
| Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |