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 coordinates

Author
Message
R Vereijken
21
Years of Service
User Offline
Joined: 2nd Mar 2004
Location:
Posted: 18th Mar 2004 19:11
This has probably been asked before (dont hate me ) but im having trouble finding it, so here it is: How can I find out which object the mouse is over? And / Or how do I find out where exactly in 3D space the mouse intersects with e.g. a groundplane??

tnx in advance
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 18th Mar 2004 19:24
Take a look at the PICK OBJECT, and PICK VECTOR X/Y/Z commands.

They only work with objects though and not matrixs or terrains.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk
Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 18th Mar 2004 19:35
All info in the code ...



Trying is the first step towards faliure.
Athelon XP 1600+/Radeon 9600 Pro/256 RAM
zircher
22
Years of Service
User Offline
Joined: 27th Dec 2002
Location: Oklahoma
Posted: 18th Mar 2004 21:31
BTW, if you add the pick vectors to the camera position it will return the location of the object intersection in world coordinates. For VirMin, I use objects as tiles for a map and I use Pick Object plus the vector stuff to place the game cursor (not the mouse cursor) in the 3D world where my mouse is.

I also check for when the pick object command sees a game object and snap the cursor to the game object's location.
--
TAZ

Bulleyes
22
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Cyberjaya, Malaysia
Posted: 19th Mar 2004 07:08
Any ideas how to make pick object works for limbs on an object?

Bad Nose Entertainment - Where games are forged from the flames of talent and passion.

http://www.badnose.com/
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Hamish McHaggis
22
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 19th Mar 2004 18:47
Bulleyes - I don't think you can at the moment, unless you create an invisible object and position it at the limb positions. I think it should be updates (maybe it is for U6) to return more things, like polygon hit, limb hit etc.

Trying is the first step towards faliure.
Athelon XP 1600+/Radeon 9600 Pro/256 RAM

Login to post a reply

Server time is: 2025-06-06 17:29:40
Your offset time is: 2025-06-06 17:29:40