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 / get3dMouse()?

Author
Message
Eminent
14
Years of Service
User Offline
Joined: 15th Jul 2010
Location:
Posted: 3rd Sep 2010 20:40
So Ive been reading up on an rts tut by Phaelax. And in one of the code snippets in there there is a command called get3dmouse(). But when I compile it, it says there is a syntax error. So my question is, how do I fix it? Or is not a native command and its from a plugin?


Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 3rd Sep 2010 21:46
It's not a built in function, it's a user declared one. I'd guess that whatever you're copying is just part of a program. Hunt around in the code for something that says "function get3dmouse()"

Eminent
14
Years of Service
User Offline
Joined: 15th Jul 2010
Location:
Posted: 4th Sep 2010 03:12
I already checked. I guess I'll have to write it myself.


Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 4th Sep 2010 08:24
it's a pretty popular tutorial... I'd be surprised if there was non-functional code where you'd have to write a "get 3d mouse" function.

Eminent
14
Years of Service
User Offline
Joined: 15th Jul 2010
Location:
Posted: 4th Sep 2010 18:05
Yeah Im surprised too.


Dar13
16
Years of Service
User Offline
Joined: 12th May 2008
Location: Microsoft VisualStudio 2010 Professional
Posted: 5th Sep 2010 20:04
When you read the tutorial, it says that whatever code you use to get the 3D coordinates from the mouse click(the matrix specific code, or the pick object() code) will be referred as get3dMouse() from that point on. So just make your own function called get3dMouse() that does the same thing.

Here's mine if you want it:


Note: You'll probably have to adjust for the tutorial but I think you can figure it out.


Login to post a reply

Server time is: 2024-09-28 22:23:10
Your offset time is: 2024-09-28 22:23:10