Answered by:
Collision questions
Question

Hello.
I'm currently trying to make a plane game. I'm working with the space divison right now, I was thinking of dividing all the triangles into cubes in an array.
I have looked a long time for an equation to check collision between a cube and a triangle but the stuff I have found used very advanced mathematics to describe it. I've heard that cube and triangle collision could be accomplished with quite simple linear algreba I havn't read so much math due to my age but I know linear algreba quite good.
My second problem should be quite easy, It's about how to check if a single point collides with a triangle. I think this can be done easily by using the bayCentric function but I just can't figure out how.
I wonder if anyone could explain these two problems for me with simple fairly simple math or even better make a simple function for them? (I'd prefer C#)
Thanks in advance!.Sunday, October 29, 2006 4:25 PM
Answers

It intersects with a ray, which has a starting point... If this is not ok with you then you'll have to find your own implementation because that's the furthest thing you can get with D3DX when it comes to collision detection... Remember that D3D is a 3D Graphics output API. It's not meant to process logic for your game (e.g. collision detection, physics, AI...etc). You can check the gdalgorithms list if you want to ask questions of such a subject...Monday, October 30, 2006 2:37 PM
All replies

The function Geometry.IntersectTri can help you in your second problem.Monday, October 30, 2006 1:54 AM

Well, IntersectTri just checks intersection between a line and a triangle not a point and a triangle right?.Monday, October 30, 2006 2:31 PM

It intersects with a ray, which has a starting point... If this is not ok with you then you'll have to find your own implementation because that's the furthest thing you can get with D3DX when it comes to collision detection... Remember that D3D is a 3D Graphics output API. It's not meant to process logic for your game (e.g. collision detection, physics, AI...etc). You can check the gdalgorithms list if you want to ask questions of such a subject...Monday, October 30, 2006 2:37 PM

Ok, So there isnt any forum on the MSDN I could be able to ask these questions?. Anyway thanks for the help :)Wednesday, November 1, 2006 3:10 PM