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 / Converting the mouse position into 3D co ords?

Author
Message
Interplanetary Funk
16
Years of Service
User Offline
Joined: 19th Apr 2010
Location: Ipswich, United Kingdom
Posted: 6th Aug 2010 02:19
I'm trying to make a RPG and would like it so that you click where you want to go as the control method. I have Dark Physics and believe that using a ray cast would be the best way to do this, however, I need to compensate for the mouse position on the screen so that instead of always ray casting onto the same spot (which will depend on the cameras position), however, my experience with game programming and understanding of 3D space mean I have NO IDEA how to implement this. I have searched but all of the threads are simply asking how to select an object, rather than get the 3D points in space, so any help/suggestions would be great.

thanks in advance for any suggestions/replies.
Indicium
18
Years of Service
User Offline
Joined: 26th May 2008
Location:
Posted: 6th Aug 2010 02:48
Look at the pick object and get pick vector commands.

Interplanetary Funk
16
Years of Service
User Offline
Joined: 19th Apr 2010
Location: Ipswich, United Kingdom
Posted: 6th Aug 2010 04:21
works brilliant thank you very much.

Login to post a reply

Server time is: 2026-07-24 20:34:56
Your offset time is: 2026-07-24 20:34:56