need help in collision detection (badly)
did any one know how to detect a collision between box and capsule (a cylinder and 2 half sphere at the top and bottom of the silinder)?
i try to make a simple 3d game fighting, using sphere, box and capsule as the object, i have finish all the other collision detect, except for the capsule and the box. the property that i have :
capsule : the top and bottom position from main axis of the cylinder, radius of the cylinder/half sphere(both is the same value).
box : all the position of the 8 vertex.
i also have the transformation matrix for each object. this will let me know the real position of each vertex in the world coordinate, and also can transform any position in the world coordinate into the object coordinate.
or if you have a tutorial for this one, please let me know, or send to my email at chris_chrono@yahoo.com
Go here. Look at the code for Distance between linear component and oriented box Find the distance between a segment and the box, then subtract the radius of the capsule. If the distance is less than or equal to zero, they''re intersecting.
Lots of good example code on that site
.

Lots of good example code on that site


This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement