get3DENCamera: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>")
m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>")
Line 24: Line 24:
_b = [_a,_y] call BIS_fnc_rotateVector2D;
_b = [_a,_y] call BIS_fnc_rotateVector2D;
_z = _b select 2;
_z = _b select 2;
_p = asin(_z / sqrt((_b [[select]] 1)^2 + _z^2));
_p = asin(_z / sqrt((_b select 1)^2 + _z^2));
get3DENCamera [[setVectorDirAndUp]] [
get3DENCamera [[setVectorDirAndUp]] [
_a,
_a,

Revision as of 14:07, 12 May 2022

Hover & click on the images for description

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:
// set exact yaw, pitch, and roll _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 ];
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