BIS fnc relPosObject: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (1 revision)
m (Text replacement - " |s1=[" to " |s1= [")
 
(26 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{RV|type=function


{{Function|= Comments
|game1= arma3
____________________________________________________________________________________________
|version1= 1.00


| arma3 |= Game name
|gr1= Positions


|1.00|= Game version
|gr2= Geometry
____________________________________________________________________________________________


| <pre>/*******************************************************************************
|descr= Place an object relative to another object, like a ''setRelPos'' command.


|s1= [parent, child, relPos, direction] call [[BIS_fnc_relPosObject]]


Description:
|p1= parent: [[Object]] - the parent object
Place object relative to another object.


Parameter(s):
|p2= child: [[Object]] - the child object
_this select 0: OBJECT - parent object
_this select 1: OBJECT - child object what will be placed
_this select 2: ARRAY  - offset [x,y,z] in parent object coords
_this select 3: SCALAR (optional) - direction of the child object


Example:
|p3= relPos: [[Position]] - ''child'' position relative to ''parent''
[BIS_briefingTable,BIS_map,[0,0,1]] call BIS_fnc_relPosObject;


Returns:
|p4= direction: [[Number]] - (Optional, default 0) direction of the child object
-


Example of quick preview code:
|r1= [[Nothing]]
[BIS_briefingTable,BIS_map,[0,-0.58,0.857],98] call BIS_fnc_relPosObject;
BIS_briefingTable setPos getPos BIS_briefingTable;


*******************************************************************************/
|x1= <sqf>[BIS_briefingTable, BIS_map, [0, -0.58, 0.857], 98] call BIS_fnc_relPosObject;</sqf>
 
</pre><small>''(Placeholder description extracted from the function header by [[BIS_fnc_exportFunctionsToWiki]])''</small> |= Description
____________________________________________________________________________________________
 
| <!-- [] call [[BIS_fnc_relPosObject]]; --> |= Syntax
 
|p1= |= Parameter 1
 
| |= Return value
____________________________________________________________________________________________
 
|x1= <code></code> |=
____________________________________________________________________________________________
 
| |= See also


|seealso= [[getRelPos]] [[getPos]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Geometry|{{uc:relPosObject}}]]
[[Category:Functions|{{uc:relPosObject}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:relPosObject}}]]

Latest revision as of 00:11, 13 July 2022

Hover & click on the images for description

Description

Description:
Place an object relative to another object, like a setRelPos command.
Execution:
call
Groups:
PositionsGeometry

Syntax

Syntax:
[parent, child, relPos, direction] call BIS_fnc_relPosObject
Parameters:
parent: Object - the parent object
child: Object - the child object
relPos: Position - child position relative to parent
direction: Number - (Optional, default 0) direction of the child object
Return Value:
Nothing

Examples

Example 1:
[BIS_briefingTable, BIS_map, [0, -0.58, 0.857], 98] call BIS_fnc_relPosObject;

Additional Information

See also:
getRelPos getPos

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