Add option for VectorUp on spawned objects.

Some of the objects used in POIs require the use of the setVectorUp command in order to maintain an upright orientation on a sloped surface. This addition adds the option for including the object's up vector in the compact arrays.
Test file: https://github.com/worldwidesorrow/Svetlojarsk
This commit is contained in:
worldwidesorrow
2019-11-22 11:50:11 -06:00
committed by GitHub
parent d0738a1298
commit bf9dc49be2

View File

@@ -15,9 +15,9 @@
Params: Params:
[ [
[ [
["ObjectType1", [position], dir], ["ObjectType1", [position], dir, vectorUp(optional)],
["ObjectType2", [position], dir], ["ObjectType2", [position], dir, vectorUp(optional)],
["ObjectType3", [position], dir] ["ObjectType3", [position], dir, vectorUp(optional)]
], ],
false, // Block damage false, // Block damage
false, // Use setPosATL instead of setPos false, // Use setPosATL instead of setPos
@@ -63,8 +63,12 @@ _fires = [
_object setPos (_x select 1); _object setPos (_x select 1);
}; };
if (count _x > 3) then {
_object setVectorUp (_x select 3);
};
if (_blockDamage) then { if (_blockDamage) then {
_object addEventHandler ["HandleDamage",{0}]; _object addEventHandler ["HandleDamage",{0}];
if !(_type in _fires) then {_object enableSimulation false;}; if !(_type in _fires) then {_object enableSimulation false;};
}; };
} forEach _objects; } forEach _objects;