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 / mouse selecting a 3d world object

Author
Message
dark puppus
22
Years of Service
User Offline
Joined: 16th Aug 2003
Location:
Posted: 23rd Aug 2003 14:18
I want to create an interface that allows a pointing and selecting with mouse. The problem is that i don't know what is the best method.

My idea is :
Trace a 3d line (not visible) starting from the mouse 2d coordinates and normal to camera view. So i find the first object intersected.
(and of course, i don't yet understand how i have to implement my idea).

Other ideas ???
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 23rd Aug 2003 14:24
You can now use the pick object() command with patch 5 - see the example under "Basic 3D examples" in the help file.

There's no place like 127.0.0.1

There are 10 people in this world, those who understand binary and those who don't.
Mnemonix
23
Years of Service
User Offline
Joined: 2nd Dec 2002
Location: Skaro
Posted: 23rd Aug 2003 15:00
David89, do u understand binary, because the number in your name has 4 possible combinations and not 2

"We are getting aggravated"
"Yes, we are"
David T
Retired Moderator
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: England
Posted: 23rd Aug 2003 17:20 Edited at: 23rd Aug 2003 17:23
Quote: "David89, do u understand binary, because the number in your name has 4 possible combinations and not 2"


10 in decimal is 2 Binary is nothing about combinations:

-First row on right is 1s
-Second row from right is 2s
-Third is 4s

therefore:

1 0 = one 2 and zero 1s = 2

Do you understand binary?

There's no place like 127.0.0.1

There are 10 people in this world, those who understand binary and those who don't.
Andy Igoe
23
Years of Service
User Offline
Joined: 6th Oct 2002
Location: United Kingdom
Posted: 23rd Aug 2003 19:22
lol - I understood it Then again, i'm one of the 10b types of people on this world.

As for selecting an object there are new commands, or if you are using the previous version of DB or dont like the new commands you can always use object screen x/y() and compare that to the mouse pointers position.

Pneumatic Dryll
Shock
AGK Developer
23
Years of Service
User Offline
Joined: 24th Oct 2002
Location: United Kingdom
Posted: 23rd Aug 2003 21:32
there are 14 / A types of people in this world, those who know hexidecimal and those who don't.

and octal is just boring, theres no point.


Sticking feathers up your butt doesn't make you a chicken.

Login to post a reply

Server time is: 2026-07-23 09:55:40
Your offset time is: 2026-07-23 09:55:40