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 / Select a 3D object with the mouse?

Author
Message
DrReaper
23
Years of Service
User Offline
Joined: 5th Feb 2003
Location: United States
Posted: 3rd Sep 2011 20:22
I am missing something. How do I select a 3D object with the mouse cursor? Theory or code would help a lot.
WLGfx
18
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 3rd Sep 2011 21:00
Return Integer=PICK OBJECT(Screen X, Screen Y, Object Start, Object End)

Warning! May contain Nuts!
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 3rd Sep 2011 21:10
I didn't know there was a Pick Object command.

Burning Feet Man
18
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 5th Sep 2011 00:53
Keep in mind that there are limitations to the "Pick Object" command, specifically; objects that are far away can't be picked by default. Usually you'll have to adjust the "Set Camera Range" to get things selectable again.

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
Stab in the Dark software
Valued Member
23
Years of Service
User Offline
Joined: 12th Dec 2002
Playing: Badges, I don't need no stinkin badges
Posted: 5th Sep 2011 02:21 Edited at: 5th Sep 2011 02:22
DrReaper

RiiDii posted a good example project on creating a 3D mouse.Here is the link.

http://forum.thegamecreators.com/?m=forum_view&t=154169&b=6

We have used it in our projects, works well.

[img][/img]


WindowsXP SP1,Vista,Windows 7 DBpro v7.61
Stab In The Dark Editor
The coffee is lovely dark and deep,and I have code to write before I sleep.

Login to post a reply

Server time is: 2026-07-11 03:38:45
Your offset time is: 2026-07-11 03:38:45