LiveOnTheFly Posted April 5, 2009 Posted April 5, 2009 I have object X object X is moving at a angle of 172 How can I calculate object X's next position?
TerarinK Posted April 5, 2009 Posted April 5, 2009 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
Kip Posted April 5, 2009 Posted April 5, 2009 I have object Xobject X is moving at a angle of 172How 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. MailSpons: Fake SMTP server for safe email testing Dutch postcode & address API.
LiveOnTheFly Posted April 5, 2009 Author Posted April 5, 2009 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now