worldToModel: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category:[ _]?Scripting[ _]Commands[ _]Take[ _]On[ _]Helicopters(\|.*)?\]\]" to "{{GameCategory|tkoh|Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| arma1 |Game name=
| arma1 |Game name=
Line 7: Line 6:


|gr1= Positions |GROUP1=
|gr1= Positions |GROUP1=
____________________________________________________________________________________________


| Converts position from world space to object model space. |DESCRIPTION=
| Converts position from world space to object model space. |DESCRIPTION=
____________________________________________________________________________________________


| model [[worldToModel]] position |SYNTAX=
| model [[worldToModel]] position |SYNTAX=
Line 25: Line 22:


|x3= <code>_relPos = car [[worldToModel]] [12000,5000]; </code>|EXAMPLE3=
|x3= <code>_relPos = car [[worldToModel]] [12000,5000]; </code>|EXAMPLE3=
____________________________________________________________________________________________


| [[worldToModelVisual]], [[vectorWorldToModel]], [[modelToWorld]] |SEEALSO=
| [[worldToModelVisual]], [[vectorWorldToModel]], [[modelToWorld]] |SEEALSO=

Revision as of 04:19, 17 January 2021

Hover & click on the images for description

Description

Description:
Converts position from world space to object model space.
Groups:
Positions

Syntax

Syntax:
model worldToModel position
Parameters:
model: Object
position: Array - world position, format PositionAGL or Position2D
Return Value:
Array - position relative to model, format PositionRelative

Examples

Example 1:
_relPos = myObject worldToModel [0,0,0];
Example 2:
_relPos = player worldToModel position car;
Example 3:
_relPos = car worldToModel [12000,5000];

Additional Information

See also:
worldToModelVisualvectorWorldToModelmodelToWorld

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

Notes

Bottom Section