Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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

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

Posted
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)

 

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...