Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

3D Collision Detection???? 1

Status
Not open for further replies.

Kryzsoccer

Programmer
Oct 15, 2002
85
0
0
US
Recently I have been playing around with DirectX8 to make a game. I am having trouble detecting when two things collide. There are two problems:

1. How to determine if one object is inside of another.

2. I am using a timer to animate this game so my objects move in steps, so how do I determine if I have gone through an object(smaller then the step)?

As always all help is appreciated!
 
See strongm's post in Thread222-334861

"Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'."
 
Thanks for the fast reply, but my game is in 3D. I did a search in this forum but only came up with ways to do it in 2D. Is there any good way to use any of these ideas in 3D. Thanks a lot!
 
No ideas anyone?!?

Does somebody have a suggestion about the theorey behind 3d collision detection (it doesn't have to be code)?

Right now my only thought is to use the equation for planes and find where (or if) they intersect, but it seems there must be a better way...

Anything to get me started would be appreciated!
 
hmmm, well I guess it depends on your shapes. A bouncing ball is simple it has a radius, so you take the ball's X,Y,Z coord + Radius and when it is within the walls X,Y,Z then COLLISION. With other shapes I think I would make a bounding box around the object then when any of the boxes X,Y,X coord fall within the wall or other object's coord, again COLLISION.

"Two strings walk into a bar. The first string says to the bartender: 'Bartender, I'll have a beer. u.5n$x5t?*&4ru!2[sACC~ErJ'. The second string says: 'Pardon my friend, he isn't NULL terminated'."
 
OK, that sounds good. For now at least a bounding box wouuld work Great.
It seems so simple now, but before your post i just couldnt get my head around it...
Thanks a lot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top