positionCameraToWorld: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 10: | Line 10: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[Array]]<nowiki>=</nowiki> '''positionCameraToWorld''' position |= Syntax | | [[Array]] <nowiki>=</nowiki> '''positionCameraToWorld''' position |= Syntax | ||
|p1= position: [[Array]] - format [[Position]] |= Parameter 1 | |p1= position: [[Array]] - format [[Position]] |= Parameter 1 |
Revision as of 23:45, 23 January 2009
Description
- Description:
- Transform position from camera coordinate space to world coordinate space.
- Groups:
- Uncategorised
Syntax
- Syntax:
- Array = positionCameraToWorld position
- Parameters:
- position: Array - format Position
- Return Value:
- Array
Examples
- Example 1:
_worldPos = positionCameraToWorld _cameraPos
Additional Information
- See also:
- See also needed
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
- Posted on October 17, 2008 - 11:25
- Kronzky
-
By measuring the distance between the camera and the player one can determine whether 1st-person or 3rd-person view is being used:
if ((positionCameraToWorld [0,0,0] distance player)>2) then {hint "3rd person"} else {hint "1st person"}