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 / mouse pos

Author
Message
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 24th Aug 2005 15:32
i need to work out the mouse position in a 3d world, err what mean is when you click on the screen somwhere it will put a marker on the map on the place you clicked like command and conquer, yea tell me if you dont get what i mean, anyway if somone could help please.thankyou

current projects = codename : tasgarad
despite what it sais to the left joined 5 december 03
Jack
20
Years of Service
User Offline
Joined: 4th Oct 2004
Location: [Germany]
Posted: 24th Aug 2005 21:28
Look in the magik (magic) World scoure there you will find your solution

[href][/href]
master programmer
19
Years of Service
User Offline
Joined: 30th May 2005
Location: 3D Space
Posted: 25th Aug 2005 03:46 Edited at: 25th Aug 2005 03:49
There should be two (if not more) solutions to your problem.

1. You could use the commands mousey() and mousex(). Like this for example:


You need to make something happen when the mouse is clicked. I don't know what exactly you want, Is it - In 2D or 3D? What appears - an Object? a Sprite? an Image? a Bitmap?

2. You could make use somehow of the screen commands, such as the position of the mouse on the screen, or make an object be the mouse, or whatever. I really haven't used this command set much, I just know it exists and may be helpful.

I hope this helps

NanoBrain
20
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 25th Aug 2005 06:23
steve c,

In addition, look up topics on the internet about vector math.


+NanoBrain+
steve c
21
Years of Service
User Offline
Joined: 30th Jan 2004
Location: united kingdom
Posted: 25th Aug 2005 18:53
okay thanks for ur help ill try some stuff and check out magic world and look up vector maths thankyou.

current projects = codename : tasgarad
despite what it sais to the left joined 5 december 03
Ooska
20
Years of Service
User Offline
Joined: 29th Aug 2004
Location:
Posted: 29th Aug 2005 18:01
Im quite new to 3d, but I have a simple idea that COULD work.
Just make a super long sulyner that points wherever your pointing. It could either be transparent (not sure if there is 'transparent' in 3d) or it could be hiding behind the mouse. if you click and the sylinder is touching the object you want something happens.
Again this is just an idea.

Weird = Unique. Unique = Human.
Im human.
Sven B
20
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 29th Aug 2005 18:05
THAT is the problem. How can you determine where the cylinder is in 3D space?

The only thing I could ever do is calculating the distance with the mouse...

Immunity and Annihalation makes Immunihalation...

Login to post a reply

Server time is: 2025-05-22 15:08:17
Your offset time is: 2025-05-22 15:08:17