get3DENCamera: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
(fixed example)
Line 15: Line 15:


|x1= <code>// set exact yaw, pitch, and roll
|x1= <code>// set exact yaw, pitch, and roll
_y = 45; _p = -80; _r = 0;
_y = 45; _p = -80; _r = 12;
[[get3DENCamera]] [[setVectorDirAndUp]] [
_a = [ [[sin]] _y * [[cos]] _p,[[cos]] _y * [[cos]] _p,[[sin]] _p];
[ [[sin]] _y * [[cos]] _p,[[cos]] _y * [[cos]] _p,[[sin]] _p],
[[get3DENCamera]] [[setVectorDirAndUp]] [_a,(_a [[vectorCrossProduct]] [1,0,0]) [[vectorCrossProduct]] _a];</code>|= EXAMPLE1  
[ [ [[sin]] _r,-[[sin]] _p,[[cos]] _r * [[cos]] _p],-_y] [[call]] [[BIS_fnc_rotateVector2D]]
 
];
</code>|= EXAMPLE1  
|x2= <code>//Look at player
|x2= <code>//Look at player
_a = [[positionCameraToWorld]] [0,0,0] [[vectorFromTo]] ([[getPosATL]] [[player]]);
_a = [[positionCameraToWorld]] [0,0,0] [[vectorFromTo]] ([[getPosATL]] [[player]]);

Revision as of 04:27, 4 October 2015

-wrong parameter ("arma3dev") defined!-[[:Category:Introduced with arma3dev version 1.52|1.52]]
Hover & click on the images for description

Description

Description:
Returns the camera object used by the 3DEN Editor.
Groups:
Uncategorised

Syntax

Syntax:
get3DENCamera
Return Value:
Object

Examples

Example 1:
// set exact yaw, pitch, and roll _y = 45; _p = -80; _r = 12; _a = [ sin _y * cos _p,cos _y * cos _p,sin _p]; get3DENCamera setVectorDirAndUp [_a,(_a vectorCrossProduct [1,0,0]) vectorCrossProduct _a];
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:
get3DENMouseOver add3DENConnection add3DENEventHandler all3DENEntities collect3DENHistory create3DENComposition create3DENEntity current3DENOperation delete3DENEntities do3DENAction get3DENActionState get3DENAttribute get3DENConnections get3DENEntityID get3DENGrid get3DENIconsVisible get3DENLinesVisible get3DENSelected is3DEN is3DENMultiplayer move3DENCamera remove3DENConnection remove3DENEventHandler removeAll3DENEventHandlers set3DENAttributes set3DENGrid set3DENIconsVisible set3DENLinesVisible set3DENObjectType

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

[[Category:Introduced with arma3dev version 1.52]][[ Category: arma3dev: New Scripting Commands | GET3DENCAMERA]][[ Category: arma3dev: Scripting Commands | GET3DENCAMERA]]

Notes


Bottom Section