Angle calculation

Recommended Posts

I have object X

object X is moving at a angle of 172

How can I calculate object X's next position?

Share on other sites

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

Share on other sites

I have object X

object X is moving at a angle of 172

How can I calculate object X's next position?

You'll have to know the speed/distance too.

And learn how to use Tan, Sin and Cos.

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

Create an account

Register a new account