武装突袭 Wiki
Advertisement
Introduced with Arma 3 version 0.50
  Arguments of this scripting command don't have to be local to the client the command is executed on

点击图片可看到更多讯息

开始使用于

游戏:
Arma 3
版本:
0.50

描述

描述:
Returns the direction object is watching (eyes, or a vehicle primary observer).

基本句法

句法:
eyeDirection unit
参数:
unit: Object
返回值:
Array - 3D Vector

范例

范例1:
can = "Land_Can_V3_F" createVehicle position player; onEachFrame { can setPosASL [ (eyePos player select 0) + (eyeDirection player select 0), (eyePos player select 1) + (eyeDirection player select 1), (eyePos player select 2) + (eyeDirection player select 2) ] }
范例2:
Draw AI eye direction (green) and weapon direction (red) in 3D: bob = createGroup east createUnit ["O_Soldier_F", [0,0,0], [], 0, "NONE"]; bob setVehiclePosition [player modelToWorld [0,100,0], [], 0, "NONE"]; onEachFrame { _beg = ASLToAGL eyePos bob; _endE = (_beg vectorAdd (eyeDirection bob vectorMultiply 100)); drawLine3D [ _beg, _endE, [0,1,0,1]]; _endW = (_beg vectorAdd (bob weaponDirection currentWeapon bob vectorMultiply 100)); drawLine3D [_beg, _endW, [1,0,0,1]]; };

额外资讯

多人游戏:
-
也可以看看:
positionCameraToWorldweaponDirectiongetCameraViewDirectionvectorDirvectorDirVisual

注意事项

此处撰写句法皆为可行用法. 可到官网[1]专页回报错误. 你可以使用讨论页面或是论坛来进行讨论.
新增注意事项 | 如何新增?

Notes

Bottom Section

Posted on May 26, 2014 - 19:10 (UTC)
Killzone Kid
This command should have really been named headDirection instead of eyeDirection as one could mistakenly think that eyes direction of your avatar correspond to the direction of the centre of your screen. In fact the direction returned by eyeDirection is avatar's head direction relative to the torso (minus ambient head animation factor). Play with the script in example 1 to find out limitations. If you need centre of screen direction, use positionCameraToWorld instead.
Advertisement