OFPEC Forum
Editors Depot - Mission Editing and Scripting => ArmA - Editing/Scripting General => Topic started by: johnnyboy on 11 Aug 2008, 21:51:38
-
Greetings.
When a player is facing one direction, he can adjust his aim left/right 10 or 20 degrees before his body changes direction.
GETDIR tells us the direction the unit's body is facing. Is there a way to detect the exact direction the unit is aiming?
Maybe by detecting the direction of the "internal view" camera of a unit?
Please advise.
-
This for AI or human? I thought that AI doesn't have floating camera.
-
You can use the weaponDirection (http://www.ofpec.com/COMREF/index.php?action=list&game=All&letter=w#816) command to find out where the gun is pointing (float zone and all), however it can't be used when the unit isn't sporting a weapon (i.e., unarmed). Alternatively, this (http://www.ofpec.com/forum/index.php?topic=31686.0) little function by Spooner might be the very thing you're looking for :cool2:
Good luck!
Wolfrug out.
-
weaponDirection works perfect. Thanks a million Wolf!
I guess this wasn't such an advanced question after all...since a command exists for it... :-[
-
I guess this wasn't such an advanced question after all
:whistle:
Moved.