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 Discussion / Does anyone know...

Author
Message
Shadow
21
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 22nd Oct 2002 22:25
Does anyone know how I can get a program to register the mouse over an object?

I can get it to tell if it is right over the centre of an object with object screen x() and object screen y(), but what if I click near the edge?

All I know is that it will probably involve knowing how far the object is from the camera.
TheNVS
21
Years of Service
User Offline
Joined: 25th Oct 2002
Location: United States
Posted: 31st Oct 2002 01:24
if you could give me a code or your program saying how the camera looks at the object then i could help.

Shadow
21
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 1st Nov 2002 22:47
I just mean a 3d object at any coordinates (as long as its on screen) with the camera at any coordinates.
Shock
AGK Developer
21
Years of Service
User Offline
Joined: 24th Oct 2002
Location: United Kingdom
Posted: 1st Nov 2002 22:57
hmm, the best thing i found for this sort of thing is not to use a 2d mouse at all.

Make a 3d arrow object, and use some of the mouse comands to see if the mouse is being moved (if it is then move the 3d object). If the mouse object is touching the other object when a user clicks the mouse, then strut your stuff

Sorry cant be of much help; in a rush.

www.shockforge.com ShockForge Software
www.havochost.com Unlim bandwdith, unlim space, you.havochost.com, you.s8i.com, visit site for more details.
...::::ShockForge::::...
Shadow
21
Years of Service
User Offline
Joined: 17th Oct 2002
Location: In the shadows
Posted: 5th Nov 2002 21:08
Thanks anyway
Shadow Robert
21
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 5th Nov 2002 21:29
yeah i do i do

you'll need to get object size X*Z/2 and Y this will give you the standard size ... now you'll have to * that number but the camera distance/100
then you'll have a kinda standard area, you then check 1/2 XY from the screen object.

Hopefully that'll all make sense

Anata aru kowagaru no watashi!
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 6th Nov 2002 00:45
Is that all it is? I thought it might contain references to the fov() and aspect ratios or something, but still. How accurate an area does that give you?
Leade
21
Years of Service
User Offline
Joined: 8th Nov 2002
Location: United Kingdom
Posted: 8th Nov 2002 15:43
i will look into this for you. i know i've done this but it was a while back and besides i'm at my work computer now so i can't check from here.

i will post it when i find it hopefully by saturday.

Login to post a reply

Server time is: 2024-04-20 08:59:12
Your offset time is: 2024-04-20 08:59:12