Created
September 17, 2022 08:54
-
-
Save nomisum/2cd0e94ce38b04aaf56004986e0e0db9 to your computer and use it in GitHub Desktop.
3den relative attachment extractor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
get offsets of all attached objects of vehicle in 3den | |
*/ | |
private _vehicle = []; | |
private _objects = []; | |
private _objectsAndOffsets = []; | |
private _collection = []; | |
private _vectors = []; | |
{ | |
if (!(_x isKindOf "LandVehicle")) then { | |
_objects pushBack _x; | |
} else { | |
_vehicle = _x; | |
}; | |
} forEach (get3DENSelected "object"); | |
{ | |
_objectsAndOffsets pushBack [typeOf _x, (_vehicle worldToModelVisual ASLToAGL (getPosWorld _x)), ([_vehicle, _x] call BIS_fnc_vectorDirAndUpRelative)]; | |
} forEach _objects; | |
_collection pushBack [typeOf _vehicle, _objectsAndOffsets]; | |
_collection |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment