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 / Picking on hidden objects

Author
Message
Unkelben
20
Years of Service
User Offline
Joined: 2nd Feb 2004
Location: Montréal, Canada
Posted: 27th Jan 2005 02:04
In order to determine if the mouse cursor is over one of the 3d objects in the scene, I'm using the dbPickObject function (if my memory is correct, I'm currently elsewhere)

Since that function's performence is pretty dependent on the complexity of the objects in the picking range, I use collision boxes for every object. The thing is : I don't want to see these boxes of course. But it seems dbPickObject will not take into account the hidden objects (which is somewhat logical)

Anyone has an idea on how to get around that? What I'm currently doing is unhiding all the boxes before picking and the rehiding them before syncing. But that's not a great solution...

Jonathan
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 27th Jan 2005 04:28
In that approach, you could try to paint the boxes black, fade them to 0, and ghost them.
That should make them invisible without using the hide object command.
billy the kid
19
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 27th Jan 2005 04:35
Im not exactly sure what you are asking.

But couldnt use you just "fly" around the visible object so the hidden object isnt hidden anymore? Of course this would only work if you are in 3D. For 2D, no idea.
Unkelben
20
Years of Service
User Offline
Joined: 2nd Feb 2004
Location: Montréal, Canada
Posted: 27th Jan 2005 23:49
Morcilla : Good idea! I've implemented it and it's much quicker.

Billy : I thnk you didn't quite understand. When I said "hidden", I don't mean hidden by another object in front of it, but hidden with the dbHideObject function.

Jonathan
billy the kid
19
Years of Service
User Offline
Joined: 7th Dec 2004
Location:
Posted: 27th Jan 2005 23:51
Ahh. Yeah I didnt understand, Im not too bright.

Login to post a reply

Server time is: 2024-04-19 10:46:54
Your offset time is: 2024-04-19 10:46:54