Results 1 to 3 of 3

Thread: Direction of Gunner in Vehicle

  1. #1
    Is there a way that I can get the direction that a gunner is facing in a vehicle?

  2. #2
    Staff Sergeant
    Join Date
    Jul 17 2004
    Location
    Grass Valley, California
    Posts
    266
    The only real way I know of is using the weaponDirection command. Get the atan2 of the x and y vectors and you will have the direction the gun is facing.

    <table border="0" align="center" width="95%" cellpadding="0" cellspacing="0"><tr><td>Code Sample </td></tr><tr><td id="CODE">_dir = &#40;&#40;vehicle weaponDirection &#34;weapon&#34; select 0&#41; atan2 &#40;vehicle weaponDirection &#34;weapon&#34; select 1&#41;&#41;;[/QUOTE]

    - dRb

  3. #3
    Thanks, I didn&#39;t know there was a command to specifically return a weapons direction.

Posting Permissions

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