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.

Newcomers DBPro Corner / Working out the mouse position with regards to the matrix

Author
Message
Enf
18
Years of Service
User Offline
Joined: 15th Jul 2006
Location:
Posted: 15th Jul 2006 19:39
I'm designing a 3d rts, it's in very early stages and i'm having trouble with telling an object where to move using the mouse. The user right clicks and the object needs to move there. But as the mouse co-ords are done in relation to the screen rather than the matrix it's not working.

Anyone got any tips on how to do this?
Ideally i want the camera to move as well, but if that will make it even more complicated i can live with it being fixed atm.
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 15th Jul 2006 22:53
Use the search.


Projects: Online CTF Game | Necommer's Guide to FPS's
Ginga
18
Years of Service
User Offline
Joined: 3rd Jul 2006
Location: Dorset, England
Posted: 16th Jul 2006 00:02
i find the search pretty damn hard n useless to be honest, its alot easier asking the same questions. Anyways, i have no idea if this would work, but try having the 'Y' position of the mouse relate to 'Z' in the matrix, or swap between them if a button is pressed.. only an idea.
RUCCUS
19
Years of Service
User Offline
Joined: 11th Dec 2004
Location: Canada
Posted: 16th Jul 2006 00:08 Edited at: 16th Jul 2006 00:09
I've seen the question asked countless times. Look up PICK SCREEN() and PICK OBJECT() in the help file, that'll convert you're mouse position into a 3D position, regardless of it's angle. With the 3D Position you can get the ground height of the matrix using the x and z coordinates you now have, getting you the ending y position of each unit. Usually people cant find what they want from the search out lf lazyness, when in reality it would take a quarter of the time to find the answer yourself instead of waiting for someone to respond. Yes, its easier to just ask again, but then its easier for us to just ignore the thread.


Projects: Online CTF Game | Newcommer's Guide to FPS's
Enf
18
Years of Service
User Offline
Joined: 15th Jul 2006
Location:
Posted: 16th Jul 2006 00:47
Thx for the info will take a look, i tried the commands page, couldn't see anything to help.
Enf
18
Years of Service
User Offline
Joined: 15th Jul 2006
Location:
Posted: 16th Jul 2006 01:40
Have had a look and can't find either of the commands anywhere. I'm using DB not DBPro incase that matters?
Dream And Death
18
Years of Service
User Offline
Joined: 21st Feb 2006
Location: The circus! Juggling job, kids and DBPro
Posted: 16th Jul 2006 11:00
Then read the %*$%&*$*^& sticky at the top of the threads and put in your title which you are using, DBC or DBP!!!!!!!!!!!!!!!

"You get what everyone gets, you get a lifetime!" - Death, The Sandman Library

First you Dream, then you ... - Neil Gaiman, 2001
Enf
18
Years of Service
User Offline
Joined: 15th Jul 2006
Location:
Posted: 16th Jul 2006 12:02
Sry, so is there a way using dbc?

Login to post a reply

Server time is: 2024-11-27 15:33:44
Your offset time is: 2024-11-27 15:33:44