modelToWorld: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Removed text added to Description.......Added it to the Notes section instead.)
mNo edit summary
Line 12: Line 12:
____________________________________________________________________________________________
____________________________________________________________________________________________


| object '''modelToWorld''' modelPos |= Syntax
| [[Position]] <nowiki>=</nowiki> [[Object]] '''modelToWorld''' [[Position]]|= Syntax


|p1= object: [[Object]] |= Parameter 1
|p2= modelPos: [[Array]] |= Parameter 2


| [[Array]] |= Return value
| [[Array]] |= Return value

Revision as of 08:48, 28 August 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:
Position = Object modelToWorld Position
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;
Posted on 16 Feb, 2007
Manny
The object model space has got its Z-Axis along the object's vectorUp, its Y-Axis along the object's vectorDir, while its X-Axis goes along vectorDir x VectorUp (meaning as the X-Axis in a right-handed cartesian coordiante system).

Bottom Section