modelToWorld: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(parameter usage and example usage)
No edit summary
Line 28: Line 28:
<dl class="command_description">
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section BEGIN -->
<HR>
<dd class="notedate">Posted on 16 Feb, 2007</dd>
<dt class="note">'''[[User:Dr_Eyeball|Dr_Eyeball]]'''</dt><dd class="note">
The ''worldPos'' parameter appears to be a relative offset to the position of ''object'', so it can often simply be [0,0,0].<BR>
The ''worldPos'' parameter appears to be a relative offset to the position of ''object'', so it can often simply be [0,0,0].<BR>
'''Example:''' to position an object ''_obj'' relative to the position of another object ''_RelObj'' with on offset of ''_Offset'', try:
'''Example:''' to position an object ''_obj'' relative to the position of another object ''_RelObj'' with on offset of ''_Offset'', try:
Line 34: Line 35:
  _worldPos = _RelObj modelToWorld _Offset;
  _worldPos = _RelObj modelToWorld _Offset;
  _obj setPos _worldPos;
  _obj setPos _worldPos;
<HR>
</dd>
<!-- Note Section END -->
<!-- Note Section END -->
</dl>
</dl>


<h3 style="display:none">Bottom Section</h3>
<h3 style="display:none">Bottom Section</h3>

Revision as of 12:24, 23 February 2007


-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

Description

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

Syntax

Syntax:
object modelToWorld modelPos
Parameters:
object: Object
modelPos: Array
Return Value:
Array

Examples

Examples:
Example needed

Additional Information

See also:
See also needed

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

Posted on 16 Feb, 2007
Dr_Eyeball
The worldPos parameter appears to be a relative offset to the position of object, so it can often simply be [0,0,0].
Example: to position an object _obj relative to the position of another object _RelObj with on offset of _Offset, try: _Offset = [_x,_y,_z]; _worldPos = _RelObj modelToWorld _Offset; _obj setPos _worldPos;

Bottom Section