getPosWorldVisual: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\{\{GameCategory\|(arma[0123])\|[ _]?New[ _]Scripting[ _]Commands[ _]List\}\}" to "{{GameCategory|$1|New Scripting Commands}}")
mNo edit summary
 
(26 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.96


|1.96|Game version=
|arg= global


|arg= global|Multiplayer Arguments=
|gr1= Object Manipulation
|gr2= Render Time Scope


|gr1= Object Manipulation |GROUP1=
|descr= Returns the provided object's, model centre position in render version in format [[Position#PositionASL|PositionASL]], rather than transformed [[boundingCenter]] or [[Oxygen_2_-_Manual#LandContact|LandContact]] vertices.
|gr2= Render Time Scope |GROUP2=
____________________________________________________________________________________________


| Returns render version of [[PositionWorld]], which is [[PositionASL]] of the model centre [0,0,0] of an object in render scope, rather than transformed [[boundingCenter]] or [[Oxygen_2_-_Manual#LandContact|LandContact]] vertices. |DESCRIPTION=
|s1= [[getPosWorldVisual]] object
____________________________________________________________________________________________


| [[getPosWorldVisual]] object |SYNTAX=
|p1= object: [[Object]]


|p1= object: [[Object]];
|r1= [[Array]] format [[Position#PositionASL|PositionASL]]  - '''the model centre'''<nowiki/>'s position (see [[getPosWorld]]) in render scope


| [[Array]] - format [[PositionWorld]] in render scope |RETURNVALUE=
|x1= <sqf>_obj setPosWorld getPosWorldVisual _obj;</sqf>
____________________________________________________________________________________________


|x1 = <code>_obj [[setPosWorld]] [[getPosWorldVisual]] _obj;</code> |EXAMPLE1=
|x2= <sqf>_groundObj modelToWorldVisualWorld [0,0,0] isEqualTo getPosWorldVisual _groundObj; // true</sqf>


|x2 = <code>_groundObj [[modelToWorldVisualWorld]] [0,0,0] [[isEqualTo]] [[getPosWorldVisual]] _groundObj; //true</code> |EXAMPLE2=
|x3= <sqf>private _waveHeight = ((boat modelToWorldVisual [0,0,0]) vectorDiff getPosWorldVisual boat) select 2;</sqf>


|x3 = Wave height under a boat:<code>_h = ((boat [[modelToWorldVisual]] [0,0,0]) [[vectorDiff]] [[getPosWorldVisual]] boat) [[select]] 2;</code> |EXAMPLE3=
|seealso= [[getPosWorld]] [[setPosWorld]] [[visiblePosition]] [[getPosATLVisual]] [[getPosASLVisual]] [[visiblePositionASL]] [[modelToWorldVisual]] [[modelToWorldVisualWorld]]
____________________________________________________________________________________________
 
| [[getPosWorld]], [[setPosWorld]], [[visiblePosition]], [[getPosATLVisual]], [[getPosASLVisual]], [[visiblePositionASL]], [[modelToWorldVisual]], [[modelToWorldVisualWorld]] |SEEALSO=
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
</dl>
<h3 style="display:none">Bottom Section</h3>
{{GameCategory|arma3|New Scripting Commands}}
{{GameCategory|arma3|Scripting Commands}}
[[Category:Scripting Commands|{{uc:{{PAGENAME}}}}]]

Latest revision as of 21:29, 28 September 2023

Hover & click on the images for description

Description

Description:
Returns the provided object's, model centre position in render version in format PositionASL, rather than transformed boundingCenter or LandContact vertices.
Groups:
Object ManipulationRender Time Scope

Syntax

Syntax:
getPosWorldVisual object
Parameters:
object: Object
Return Value:
Array format PositionASL - the model centre's position (see getPosWorld) in render scope

Examples

Example 1:
_obj setPosWorld getPosWorldVisual _obj;
Example 2:
_groundObj modelToWorldVisualWorld [0,0,0] isEqualTo getPosWorldVisual _groundObj; // true
Example 3:
private _waveHeight = ((boat modelToWorldVisual [0,0,0]) vectorDiff getPosWorldVisual boat) select 2;

Additional Information

See also:
getPosWorld setPosWorld visiblePosition getPosATLVisual getPosASLVisual visiblePositionASL modelToWorldVisual modelToWorldVisualWorld

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