Collision Detect needs help ~

Joined
May 31, 2004
Messages
16
Can anybody explain to me briefly how Collision Detect between two 3D objects works? Is it as simple as using some IF statements? or am i in a completely different planet? Thank you guys.
 
if your using D3D,
just use Mesh.intersect

what it does is it checks whether a ray hits another object
like

--- ---
|(M) (C)|
--- ---
0,0 10,0
(horrible illustration...lol)
if you weanted to test whether guy(M) hit anything in front of him (pretend the "M" is 0,0 and the "C" is 10,0) by lets say... 20 pixels

(i dont remember the exact command and arguments but here it is anyways)
If TheGuyA.Intersect(New Vector3(0,0,0),New Vector3(10,0,0)) Then
//A hit something(you cant tell if its B, it just tells you it hit something)
End if

..at least i think i got the syntax (and the concept) right but i cant tell you right now cuz i donthave a comp w/ .net anymore lol

pent
 
Back
Top