getPosWorldVisual: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "|= Game version" to "|Game version=")
m (Text replacement - ";[ ]+ " to "; ")
(22 intermediate revisions by 3 users not shown)
Line 1: Line 1:
{{Command|Comments=
{{RV|type=command
____________________________________________________________________________________________


| arma3dev |Game name=
|game1= arma3
|1.95|Game version=
|version1= 1.96
|arg= global|Multiplayer Arguments=


____________________________________________________________________________________________
|arg= global


| 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=
|gr1= Object Manipulation
____________________________________________________________________________________________
|gr2= Render Time Scope


|'''getPosWorldVisual''' object |SYNTAX=
|descr= 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.
|p1 = object: [[Object]];
| [[Array]] - format [[PositionWorld]] in render scope |RETURNVALUE=
____________________________________________________________________________________________
|x1 = <code>_obj [[setPosWorld]] [[getPosWorldVisual]] _obj;</code> |EXAMPLE1=


|x2 = <code>_groundObj [[modelToWorldVisualWorld]] [0,0,0] [[isEqualTo]] [[getPosWorldVisual]] _groundObj; //true</code> |EXAMPLE1=
|s1= [[getPosWorldVisual]] object


|x3 = Wave height under a boat:<code>_h = ((boat [[modelToWorldVisual]] [0,0,0]) [[vectorDiff]] [[getPosWorldVisual]] boat) [[select]] 2;</code> |EXAMPLE1=
|p1= object: [[Object]];


|r1= [[Array]] - format [[PositionWorld]] in render scope


|x1= <code>_obj [[setPosWorld]] [[getPosWorldVisual]] _obj;</code>


| [[getPosWorld]], [[setPosWorld]], [[visiblePosition]], [[getPosATLVisual]], [[getPosASLVisual]], [[visiblePositionASL]], [[modelToWorldVisual]], [[modelToWorldVisualWorld]] |SEEALSO=
|x2= <code>_groundObj [[modelToWorldVisualWorld]] [0,0,0] [[isEqualTo]] [[getPosWorldVisual]] _groundObj; //true</code>


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

Revision as of 01:54, 8 August 2021

Hover & click on the images for description

Description

Description:
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 LandContact vertices.
Groups:
Object ManipulationRender Time Scope

Syntax

Syntax:
getPosWorldVisual object
Parameters:
object: Object;
Return Value:
Array - format PositionWorld in render scope

Examples

Example 1:
_obj setPosWorld getPosWorldVisual _obj;
Example 2:
_groundObj modelToWorldVisualWorld [0,0,0] isEqualTo getPosWorldVisual _groundObj; //true
Example 3:
Wave height under a boat:_h = ((boat modelToWorldVisual [0,0,0]) vectorDiff getPosWorldVisual boat) select 2;

Additional Information

See also:
getPosWorldsetPosWorldvisiblePositiongetPosATLVisualgetPosASLVisualvisiblePositionASLmodelToWorldVisualmodelToWorldVisualWorld

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