-
Staff Sergeant
Is there a way that I can get the direction that a gunner is facing in a vehicle?
-
Staff Sergeant
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 = ((vehicle weaponDirection "weapon" select 0) atan2 (vehicle weaponDirection "weapon" select 1));[/QUOTE]
- dRb
-
Staff Sergeant
Thanks, I didn'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
-
Forum Rules