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.

DarkBASIC Professional Discussion / Know if an object is in the camera field ?

Author
Message
Hell_666
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 6th Jun 2010 10:44
Hello, I would like know how do to know if an object is in the camera field, for instance, I've my object behind me, so behind the camera and not in the camera field, how detect if my object is in the camera field or not (with code, not with eyes ^^).


Thanks a lot.

Eternal suffering ...

I'm french
=PRoF=
23
Years of Service
User Offline
Joined: 17th Mar 2003
Location: Milton Keynes, UK
Posted: 6th Jun 2010 12:48
Look up OBJECT IN SCREEN in the help files, I think its what u'r after

The Slayer
Forum Vice President
16
Years of Service
User Offline
Joined: 9th Nov 2009
Playing: (Hide and) Seek and Destroy on my guitar!
Posted: 6th Jun 2010 12:49 Edited at: 6th Jun 2010 12:53
<edit>

wrong post

Slayer rules!!! Yeaaah, man!
Hell_666
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 6th Jun 2010 13:21
I've seen Object in screen but it ignore the wall and I can't use the visibility expression because I want hide the object if is not in the screen

Eternal suffering ...

I'm french
Sasuke
20
Years of Service
User Offline
Joined: 2nd Dec 2005
Location: Milton Keynes UK
Posted: 6th Jun 2010 14:34 Edited at: 6th Jun 2010 14:50
This will be a pain and a half, the only way to do this is to create a View Frustum Culling method, not only that but you'll need to create an Octree (useful for other stuff like collision) if you want it to run fast when object count is high. All are say is your not going to have fun learning this one. Google 'View Frustum Culling' to learn about it.

A dream is a fantasy, if you achieve that fantasy it was never a dream to begin with.
Hell_666
17
Years of Service
User Offline
Joined: 11th Jul 2009
Location: France
Posted: 6th Jun 2010 15:34
Thanks

Eternal suffering ...

I'm french

Login to post a reply

Server time is: 2026-07-25 14:18:07
Your offset time is: 2026-07-25 14:18:07