Jump to content

Angle calculation


Recommended Posts

Well where is the object X at to start off from and what is angle relative to? If you say Object X is at 0,0 moving 172 degrees at relative to 0,0 grid based and we are presuming it would be decimals. That would mean your ship turned and is going 8 degrees on the upper axis so your going and you would reach 1,-.09 as your next target however if you need both of them digits then a rough estimate of 11,-1 would be your next full int digit

0x576520616C6C206469652C206C697665206C69666520617320696620796F75207765726520696E20746865206C617374207365636F6E642E

Link to comment
Share on other sites

Sorry for being stupid and not using the search button(silly me).

I found what I needed

Func Angle($x1, $y1, $Ang, $Length)

Local $Return[2]

$Return[0] = $x1 + ($Length * Cos($Ang / 180 * 3.14159265358979))

$Return[1] = $y1 - ($Length * Sin($Ang / 180 * 3.14159265358979))

Return $Return

EndFunc ;==>Angle

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...