billboard collision in tutorial 7

Irrlicht.Net is no longer developed or supported, Irrlicht.Net Cross Platform is a much more complete wrapper. Please ask your C# related questions on their forums first.
Locked
jingquan
Posts: 222
Joined: Sun Aug 20, 2006 4:10 am
Contact:

billboard collision in tutorial 7

Post by jingquan »

As seen in tutorial 7, the target (that yellow sphere in the center of the screen) points at where you are looking and it appears to be on the walls.

I figure it out myself it has something to do with:

Code: Select all

Dim line As Line3D = New Line3D 
line.start = camera.Position 
line.end = line.start + (camera.Target - line.start).Normalize * 1000 
Dim intersection As Vector3D 
Dim tri As Triangle3D 
If smgr.SceneCollisionManager.GetCollisionPoint(line, selector, intersection, tri) Then 
bill.Position = intersection
I tried inserting it into my project but gotten funny results. e.g. the target moved from the center of the screen.

How can I replica the function seen in tut 7???
Locked