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 / how to get the angle between two points

Author
Message
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 16th Feb 2003 19:54
My trigonometry is rusty and I can't figure this out, basically I have two sprites and need to find out what angle a line between sprite 1 and 2 is.
Any pointers will do as I should be able to work it out after a little shove in the correct direction.
hexGEAR
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 16th Feb 2003 20:58
check out "easil confused's" thread, it covers all of this, it even covers both 2D and 3D

http://http://www.darkbasicpro.com/apollo/view.php?t=2909&b=6

your birth was a blessing, sent to live and die on earth as a lesson, we each have a star all you have to do is find it, once you do, everyone who sees it will be blinded - DMX
hexGEAR
21
Years of Service
User Offline
Joined: 3rd Nov 2002
Location: Naytonia
Posted: 16th Feb 2003 21:01
or try this:

http://www.darkbasicpro.com/apollo/view.php?t=2909&b=6

your birth was a blessing, sent to live and die on earth as a lesson, we each have a star all you have to do is find it, once you do, everyone who sees it will be blinded - DMX
the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 16th Feb 2003 21:23
thanks. atanfull() is just what I was looking for

the_winch
21
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 16th Feb 2003 21:51
This is what I ended up with.
The axo,ayo,bxo,byo are so you can do it from different positions on the sprite.
For the middle of a 20x10 sprite
axo = 10 : ayo = 5



Chiwawa
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Canada
Posted: 16th Feb 2003 22:39
this is an example...if get angle ..without atanfull ....
i did that for an other question...but...


Login to post a reply

Server time is: 2024-09-19 18:03:17
Your offset time is: 2024-09-19 18:03:17