getCameraViewDirection: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "\| *((\[\[[a-zA-Z0-9_ |()]+\]\],? ?)+) * \}\}" to "|seealso= $1 }}") |
Lou Montana (talk | contribs) m (Text replacement - " \| *(\[\[[a-zA-Z ]+\]\].+) \|x1=" to " |r1=$1 |x1=") |
||
Line 13: | Line 13: | ||
|p1= unit: [[Object]] | |p1= unit: [[Object]] | ||
| [[Array]] - 3D Vector | |r1=[[Array]] - 3D Vector | ||
|x1= Draw AI eye direction (green), weapon direction (red) and camera direction (blue) in 3D: <code>bob = [[createGroup]] [[east]] [[createUnit]] ["O_Soldier_F", [0,0,0], [], 0, "NONE"]; | |x1= Draw AI eye direction (green), weapon direction (red) and camera direction (blue) in 3D: <code>bob = [[createGroup]] [[east]] [[createUnit]] ["O_Soldier_F", [0,0,0], [], 0, "NONE"]; |
Revision as of 20:45, 10 June 2021
Description
- Description:
- Description needed
- Groups:
- Object Manipulation
Syntax
- Syntax:
- Syntax needed
- Parameters:
- unit: Object
- Return Value:
- Array - 3D Vector
Examples
- Example 1:
- Draw AI eye direction (green), weapon direction (red) and camera direction (blue) 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]]; _endV = (_beg vectorAdd (getCameraViewDirection bob vectorMultiply 100)); drawLine3D [_beg, _endV, [0,0,1,1]]; };
Additional Information
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note