eyeDirection: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(example)
Line 17: Line 17:




|x1= <code>
|x1= <code>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)
    ]
}
</code>|= EXAMPLE1  
</code>|= EXAMPLE1  


____________________________________________________________________________________________
____________________________________________________________________________________________


| |= SEEALSO  
| [[positionCameraToWorld]] |= SEEALSO  


|  |= MPBEHAVIOUR  
|  |= MPBEHAVIOUR  

Revision as of 20:03, 26 May 2014

Hover & click on the images for description

Description

Description:
Returns the direction object is watching (eyes, or a vehicle primary observer).
Groups:
Uncategorised

Syntax

Syntax:
eyeDirection unit
Parameters:
unit: Object
Return Value:
Array

Examples

Example 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) ] }

Additional Information

See also:
positionCameraToWorld

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

Notes

Bottom Section