Positions one object relative to another one, taking into account possible offsets or memory points.
The original orientation of either object is preserved.
The child object is only positioned at the calculated position, but is not attached.
|Syntax:||[child, parent, offset, posChild, posParent, repos] call fn_vbs_positionObjectRelToObject|
|Return Value:||PositionASL - Calculated, absolute position of child object (if |
When using functions in VBS versions older than 3.4, certain limitations and requirements should be kept in mind - the main ones being that capitalization of the function name is crucial, and that #include "\vbs2\headers\function_library.hpp" has to be included in every script that utilizes it. More Functions A-Z.
Position object 'hat' at player memory point "head", 10cm above the default position:
[hat,player,[0,0,.1],[0,0,0],"head"] call fn_vbs_positionObjectRelToObject
Examples of different attachments, using memory points "BR" (bottom right) and "TL" (top left):