modelToWorldVisualWorld: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(Created page with "{{Command|= ____________________________________________________________________________________________ |arma3dev|= Game |1.70|= Game Version |arg= |= Multiplayer Arguments...")
 
m (Fix)
 
(53 intermediate revisions by 8 users not shown)
Line 1: Line 1:
{{Command|=
{{RV|type=command
____________________________________________________________________________________________
 
|arma3dev|= Game
|game1= arma3
|1.70|= Game Version
|version1= 1.70
|arg= |= Multiplayer Arguments
 
|eff=  |= Multiplayer Effects
|arg= global
____________________________________________________________________________________________
 
| onverts position from object model space to world space in render time. |= Description
|gr1= Object Manipulation
____________________________________________________________________________________________
 
| obj '''modelToWorldVisualWorld''' modelPos |= Syntax
|gr2= Render Time Scope
|p1= obj: [[Object]] - |= Parameter 1
 
|p2= modelPos: [[Array]] - |= Parameter 2
|descr= Converts position from object model space to world space in render time scope. For the [[Position#PositionAGL|PositionAGL]] version see [[modelToWorldVisual]].
|p3=  |= Parameter 3
{{Feature|important|
|p4=  |= Parameter 4
For [[setObjectScale|scaled objects]], the relative position will first be [[vectorMultiply|multiplied]] by the object scale.<br>
|p5=  |= Parameter 5
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>).
|p6=  |= Parameter 6
| [[Array]] |= Return Value
|x1=  |= Example 1
| [[modelToWorldWorld]] |= See Also
}}
}}


<dl class='command_description'>
|s1= obj [[modelToWorldVisualWorld]] modelPos
<!-- 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>
|p1= obj: [[Object]]
<!-- Appropriate categories go here -->


[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
|p2= modelPos: [[Array]] format [[Position#PositionRelative|PositionRelative]]
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]
 
|r1= [[Array]] in format [[Position#PositionASL|PositionASL]] - '''the model's centre''' (see [[getPosWorld]])
 
|x1= <sqf>player modelToWorldVisualWorld [0,1,0];</sqf>
 
|seealso= [[modelToWorldWorld]] [[modelToWorldVisual]] [[getPosWorldVisual]]
}}

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