GoDarkCherries Posted June 2, 2004 Posted June 2, 2004 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. Quote
ThePentiumGuy Posted June 2, 2004 Posted June 2, 2004 if your using D3D, just use Mesh.intersect what it does is it checks whether a ray hits another object like --- --- |(M) ©| --- --- 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 Quote My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!) vbprogramming.8k.com My Project (Need VB.NET Programmers) http://workspaces.gotdotnet.com/ResolutionRPG
GoDarkCherries Posted June 2, 2004 Author Posted June 2, 2004 Thank for your help, i think i have the general idea, i will try it out later. ^_^ Quote
ThePentiumGuy Posted June 4, 2004 Posted June 4, 2004 Thank for your help' date=' i think i have the general idea, i will try it out later. ^_^[/quote'] hey i reinstalled .net here's how to use the command If yourmesh.Intersect(anothermesh's position, a direction which is v3) Quote My VB.NET Game Programming Tutorial Site (GDI+, Direct3D, Tetris [coming soon], a full RPG.... you name it!) vbprogramming.8k.com My Project (Need VB.NET Programmers) http://workspaces.gotdotnet.com/ResolutionRPG
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.