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 / Make object Point towards mouse on Yaxis?

Author
Message
AJ Schaeffer
16
Years of Service
User Offline
Joined: 22nd Aug 2009
Location: Jacksonville,FL
Posted: 12th Dec 2010 00:06
Im making a top-down shooter, how do i make the character point at the mouse?

Thanks

C0wbox
20
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 12th Dec 2010 00:36
Probably best to make a dummy object that the game uses in place of the mouse and have it point at that instead. - You can either just move that dummy object using the mousemove commands or draw raycasts from the camera based on the mouse's position but I don't know how that second one works, I've never tried it myself.

AJ Schaeffer
16
Years of Service
User Offline
Joined: 22nd Aug 2009
Location: Jacksonville,FL
Posted: 12th Dec 2010 01:31
Ill try that and btw world off road looks AMAZING

C0wbox
20
Years of Service
User Offline
Joined: 6th Jun 2006
Location: 0,50,-150
Posted: 12th Dec 2010 01:46
xD Thanks; it should look better once I get v0.18 out, it's getting a media overhaul. !

miso
16
Years of Service
User Offline
Joined: 16th Jun 2010
Location: Budapest, Hungary, 127.0.0.1
Posted: 12th Dec 2010 02:03
You can use atanfull to get the angle too.



No place like 127.0.0.1 .

Login to post a reply

Server time is: 2026-07-21 04:20:20
Your offset time is: 2026-07-21 04:20:20