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 / Degrees from two points?

Author
Message
bunghole
21
Years of Service
User Offline
Joined: 10th Feb 2004
Location: Finland
Posted: 7th Sep 2004 20:16
Sprite should move to direction where the mousebutton is been pressed.. But when I try using the command for it, it can't
give the right degrees from (if -> is 0 degrees v 90 degrees etc.)
180 to 270 (anyway, the quarter of degrees).. If someone understands this would he tell me how to solve the problem?

How to count degrees from two different coordinates?
Xander
22
Years of Service
User Offline
Joined: 3rd Mar 2003
Location: In college...yeah!
Posted: 8th Sep 2004 09:15
Are you using trigonemtry? This code will store the angle between the two points. The second part uses the stored angle to reposition a sprite.





That should work...tell me if it doesn't

Xander Moser of Bolt Software
Firewall: Your Computer's First Defense - Real Time Strategy game
[href][/href]
blanky
20
Years of Service
User Offline
Joined: 3rd Aug 2004
Location: ./
Posted: 10th Sep 2004 03:33
Woah. Maths. Long time since I've used that thing... Start > Run > calc.exe normally does me.....

[img src=http://blanky.pt-web.net/ddd.gif] >::p

Login to post a reply

Server time is: 2025-05-24 23:28:47
Your offset time is: 2025-05-24 23:28:47