Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Line of sight

Author
Message
old man
20
Years of Service
User Offline
Joined: 25th Feb 2004
Location:
Posted: 13th Oct 2009 21:11
Hi all

I have a T shaped object made with meshes added as limbs, object 1

I have dbSetObjectCollisionToBoxes(1)

I have another object (2) that passes behind T shape with text displayed at screenX screenY
if (dbStaticLineOfSight(dbCameraPositionX(),dbCameraPositionY(),dbCameraPositionZ(),dbObjectPositionX(2),dbObjectPositionY(2),dbObjectPositionZ(2),50,50)==0)

But it always prints, (ie it is always = 0)

Does StaticLineOfSight work? If so am I not using it properly??

uff
Mireben
16
Years of Service
User Offline
Joined: 5th Aug 2008
Location:
Posted: 13th Oct 2009 22:40
This is just a guess. The documentation says: "This command will return a one if the specified 3D line from Sx,Sy,Sz to Dx,Dy,Dz collides with an already defined static collision box." You may need to create such a box around your object with the dbMakeStaticCollisionBox function.

Login to post a reply

Server time is: 2024-11-20 13:21:06
Your offset time is: 2024-11-20 13:21:06