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.

Newcomers DBPro Corner / Is there a command to know : Who see what ?

Author
Message
Fabio
20
Years of Service
User Offline
Joined: 1st Dec 2003
Location:
Posted: 25th Jul 2007 00:16
Is there a command to know if the camera see an object?

And is there a command to know if there is not something between 2 objects?
Intersect object is no good, because you must test every objects to know if any object is between the 2 points

yours
Fabio
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 25th Jul 2007 01:26
Get Sparky collision Dll. It's free and does super-fast ray tracing and will give you a list of objects numbers between two points, nearest first.

Boo!
Jane Doe
17
Years of Service
User Offline
Joined: 29th Jun 2007
Location:
Posted: 25th Jul 2007 01:29
Check out the OBJECT IN SCREEN () and OBJECT VISIBLE() functions.

As far as checking for intervening objects, I think that checking every object is pretty much what you're going to have to do. There are a few ways to do this. You could store the list of object numbers in an array and use a FOR/NEXT loop to check using INTERSECT OBJECT(). You could use Sparky's which I believe has commands that will automate this task for you.

- Jane
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 25th Jul 2007 03:36 Edited at: 26th Jul 2007 02:41
Expanding on Jane Doe:

OBJECT IN SCREEN(object): Tells if an object is within the bounds of the screen (Press F1 on the command for details). Returns a 0 if the object isn't in bounds, and a 1 if it is

OBJECT VISIBLE(object): Tells if an object is hidden (using the HIDE OBJECT command) or not. Returns a 0 if the object is hidden, and a 1 if it isn't. (in my opinion the help files don't explain it well enough)

Think of 0 as false and 1 as true.

Good luck

Fabio
20
Years of Service
User Offline
Joined: 1st Dec 2003
Location:
Posted: 2nd Aug 2007 23:12
Yes, Sparky rules.

OBJECT IN SCREEN and OBJECT VISIBLE are no good.
INTERSECT OBJECT can work, but I use it in other my routines.
In the our case INTERSECT OBJECT need too much for next cicles (a test for every object).

I did not want it, but at last I must use Sparky's DLL.

I do not understand why DBP can not have native commands to make so usefull tasks.

Thank you Sparky, again.

yours
Fabio

Login to post a reply

Server time is: 2024-11-25 13:47:04
Your offset time is: 2024-11-25 13:47:04