get3DENCamera: Difference between revisions
Jump to navigation
Jump to search
Waffle SS. (talk | contribs) m (fixed example format) |
Lou Montana (talk | contribs) m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>") |
||
(69 intermediate revisions by 6 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=command | ||
| | |game1= arma3 | ||
|version1= 1.56 | |||
| | |gr1= Eden Editor | ||
| Returns the camera | |descr= Returns the camera [[Object]] used by the [[:Category:Eden Editor|Eden Editor]]. | ||
| | |s1= [[get3DENCamera]] | ||
|r1= [[Object]] - [[:Category:Eden Editor|Eden Editor]] camera | |||
|x1= < | |x1= <sqf> | ||
// set exact yaw, pitch, and roll | |||
_y = 45; _p = -80; _r = 0; | _y = 45; _p = -80; _r = 0; | ||
get3DENCamera setVectorDirAndUp [ | |||
[sin _y * cos _p,cos _y * cos _p,sin _p], | |||
[[sin _r,-sin _p,cos _r * cos _p],-_y] call BIS_fnc_rotateVector2D | |||
]; | ]; | ||
</ | </sqf> | ||
|x2= < | |||
_a = | |x2= <sqf> | ||
_y = | //Look at player | ||
_b = [_a,_y] | _a = positionCameraToWorld [0,0,0] vectorFromTo (getPosATL player); | ||
_z = _b | _y = asin(_a select 0); | ||
_p = | _b = [_a,_y] call BIS_fnc_rotateVector2D; | ||
get3DENCamera | _z = _b select 2; | ||
_p = asin(_z / sqrt((_b select 1)^2 + _z^2)); | |||
get3DENCamera setVectorDirAndUp [ | |||
_a, | _a, | ||
[ [0,- | [[0,-sin _p,cos _p],-_y] call BIS_fnc_rotateVector2D | ||
]; | ]; | ||
</ | </sqf> | ||
| | |seealso= [[move3DENCamera]] [[set3DENAttributes]] | ||
[[move3DENCamera]] | |||
[[set3DENAttributes]] | |||
}} | }} | ||
Latest revision as of 19:42, 3 September 2024
Description
- Description:
- Returns the camera Object used by the Eden Editor.
- Groups:
- Eden Editor
Syntax
- Syntax:
- get3DENCamera
- Return Value:
- Object - Eden Editor camera
Examples
- Example 1:
- Example 2:
- //Look at player _a = positionCameraToWorld [0,0,0] vectorFromTo (getPosATL player); _y = asin(_a select 0); _b = [_a,_y] call BIS_fnc_rotateVector2D; _z = _b select 2; _p = asin(_z / sqrt((_b select 1)^2 + _z^2)); get3DENCamera setVectorDirAndUp [ _a, [[0,-sin _p,cos _p],-_y] call BIS_fnc_rotateVector2D ];
Additional Information
- See also:
- move3DENCamera set3DENAttributes
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