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 / point object towards mouse

Author
Message
Travis
21
Years of Service
User Offline
Joined: 9th Nov 2003
Location: West Aust.
Posted: 9th Nov 2003 15:39
i want to point a plane object towards the mouse cursor
its in a top down view so i want it to rotate around the z axis

i tryd point object n,mousex(),mousey(),0 but the object just dissapears

i also tryd a few things using the arc tangent and stuff but i couldnt get it working

any help or ideas are greatly apreciated, and any ideas on the rest of the code aswell (btw its gunan be a server/client online game)

thanks
Travis
21
Years of Service
User Offline
Joined: 9th Nov 2003
Location: West Aust.
Posted: 11th Nov 2003 01:41
um is this a really hard thing to do or cant anyone think how? its because to point an object towards another one you must be able to locate both the objects and this is my downfall as the mouse is in 2d x,y pixles numbers from 0,0 to 640,480 where as the object is in 3d x,y units numbers from 0,0 to about 8,6 see my problem? also pixles start up the top left where the units start from the bottom left(i think) any ideas how to convert one into the other?

Login to post a reply

Server time is: 2025-05-21 16:47:56
Your offset time is: 2025-05-21 16:47:56