modelToWorldVisualWorld: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Fix)
 
(51 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Command|=
{{RV|type=command
____________________________________________________________________________________________


|arma3|= Game
|game1= arma3
|1.70|= Game Version
|version1= 1.70
|arg=  |= Multiplayer Arguments
|eff=  |= Multiplayer Effects


____________________________________________________________________________________________
|arg= global


| Converts position from object model space to world space in render time. |= Description
|gr1= Object Manipulation


____________________________________________________________________________________________
|gr2= Render Time Scope


| obj '''modelToWorldVisualWorld''' modelPos |= Syntax
|descr= Converts position from object model space to world space in render time scope. For the [[Position#PositionAGL|PositionAGL]] version see [[modelToWorldVisual]].
|p1= obj: [[Object]] |= Parameter 1
{{Feature|important|
|p2= modelPos: [[Array]] |= Parameter 2
For [[setObjectScale|scaled objects]], the relative position will first be [[vectorMultiply|multiplied]] by the object scale.<br>
| [[Array]] |= Return Value
For example, if the object's scale is 2, <sqf inline>_obj modelToWorldVisualWorld [0,1,0]</sqf> will be offset '''2 meters''' from the model center (<sqf inline>[0,0,0]</sqf>).
}}


|x1= <code>([[getPos]] [[player]]) [[modelToWorldVisualWorld]] [0,1,0]</code> |= Example 1
|s1= obj [[modelToWorldVisualWorld]] modelPos
| [[modelToWorldWorld]] |= See Also
 
}}
|p1= obj: [[Object]]
 
|p2= modelPos: [[Array]] format [[Position#PositionRelative|PositionRelative]]


<dl class='command_description'>
|r1= [[Array]] in format [[Position#PositionASL|PositionASL]] - '''the model's centre''' (see [[getPosWorld]])
<!-- BEGIN Note Section -->
<!-- For example:
<dd class='notedate'>Posted on Month Day, Year - Time (UTC)</dd>
<dt class='note'>'''[[User:User Name|User Name]]'''</dt>
<dd class='note'>This is an example note. It is true and verifiable, and contains a little code snippet.
<code>[[if]] ([[_this]] == anExample) [[then]] { [[hint]] Leave it here for others to read; };</code></dd>
-->
<!-- END Note Section -->
</dl>


<h3 style='display:none'>Bottom Section</h3>
|x1= <sqf>player modelToWorldVisualWorld [0,1,0];</sqf>
<!-- Appropriate categories go here -->


[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
|seealso= [[modelToWorldWorld]] [[modelToWorldVisual]] [[getPosWorldVisual]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
}}

Latest revision as of 15:46, 1 July 2022

Hover & click on the images for description

Description

Description:
Converts position from object model space to world space in render time scope. For the PositionAGL version see modelToWorldVisual.
For scaled objects, the relative position will first be multiplied by the object scale.
For example, if the object's scale is 2, _obj modelToWorldVisualWorld [0,1,0] will be offset 2 meters from the model center ([0,0,0]).
Groups:
Object ManipulationRender Time Scope

Syntax

Syntax:
obj modelToWorldVisualWorld modelPos
Parameters:
obj: Object
modelPos: Array format PositionRelative
Return Value:
Array in format PositionASL - the model's centre (see getPosWorld)

Examples

Example 1:
player modelToWorldVisualWorld [0,1,0];

Additional Information

See also:
modelToWorldWorld modelToWorldVisual getPosWorldVisual

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