Results 1 to 4 of 4

Thread: I need help with bearing and range for flight simulator

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Posts
    2
    I am writing a flight simulator type game and I can't seem to figure out how to get an accurate bearing and range to other aircraft. I am using just the basic x and y screen coordinates. I have VB 5.0 and would like all the help I can get.

  2. #2
    Junior Member Caleb's Avatar
    Join Date
    Jan 2001
    Posts
    24

    Smile

    Try using the Cosine and sine method for the bearing
    It should Help.
    Any way here's a simple help for the range of aircrafts.

    E
    |\
    o| \h
    | \
    X----Y
    a

    Above is a triange

    E is aircraft 1
    Y is aircraft 2
    OK?
    Now using Tearum Pithogarus, You can get b, the distance bettween E and Y by this formular. h^=o^+a^
    then You squar root it. In vb I think it's Like this. Sqr(b)

    There you got your distance.

  3. #3
    Frenzied Member HarryW's Avatar
    Join Date
    Jan 2000
    Location
    Heiho no michi
    Posts
    1,827
    I think that was meant to look like this:
    Code:
     E 
     |\ 
    o| \h 
     |  \ 
    X----Y 
       a
    Harry.

    "From one thing, know ten thousand things."

  4. #4

    Thread Starter
    New Member
    Join Date
    Jan 2001
    Posts
    2

    Thank you

    Thanks for the help guys. I was finnaly able to get the bearing and range to work the way I want it to. The Cosine and Sine functions fixed the problem.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width