Agwan
11-19-2005, 08:39 PM
Does anyone know how to do orientated bounding box collisions AND Triangle to triangle collisions, USING VISUAL BASIC .net AND DIRECT3D 9c.
If you know how to do any of these things could you post a example (commented if you can), I've already looked everywhere so don't give me any links unless they are very good. Thanks.
Frisker
11-25-2005, 02:14 AM
Does anyone know how to do orientated bounding box collisions AND Triangle to triangle collisions, USING VISUAL BASIC .net AND DIRECT3D 9c.
If you know how to do any of these things could you post a example (commented if you can), I've already looked everywhere so don't give me any links unless they are very good. Thanks.
When you are making collision checks in 3D first think about how you would do
in in 2D for example, A rectangle in 2D is :
If posX => Rect.x and posX =< Rect.x + Rect.width _
and posY => Rect.y and posY =< Rect.y + Rect.Height then
'Collision stuff here
end if
In 3D
If posX => Rect.x and posX =< Rect.x + Rect.width _
and posY => Rect.y and posY =< Rect.y + Rect.Height _
and posZ => Rect.z and posZ =< Rect.Z + Rect.Depth then
'Collision stuff here
end if
I don't got any good collision check with triangles in my mind but,
The top of the triangle has 0 width and deep and the buttom x,y.
The middle of the triangle got x / 2, y / 2 So you can make it with some nice dividing with the z axis.. but i'm sure there is much nicer ways
Agwan
12-07-2005, 06:29 PM
3d not bounding boxes or spheres advanced algorithms!
Leade
12-16-2005, 03:59 AM
if it was Dx8 i could help cos it's a piece of p**s. just write ur own.
baseline for boxes is, take the furthest vertex on each axis and you can define the box,
baseline for spheres is, take the center of the mesh and the furthest vertex of all vertecies and you can define a sphere.