Hi,
I'd like to add an item in the editor with a given angle for a turret (main gun).
The code below works fine for a tank e.g. CSLA_T72M1 but doesn't for an artillery, I've tried for gm_pl_army_2s1.
Could you please advice how to deal with it?
private _position = screenToWorld [0.4, 0.4];
private _pt_center = screenToWorld [0.5, 0.5];
private _grp = createGroup east;
private _unit = _grp createUnit [ "C_man_p_beggar_F", _pt_center, [], 0, "FORM"];
private _angle_target = 111;
private _itemTarget = createVehicle ["CSLA_T72M1", [(_position select 0) + 300 * (cos _angle_target), (_position select 1) + 300 * (sin _angle_target), 0], [], 0, "CAN_COLLIDE"];
private _item = createVehicle ["CSLA_T72M1", _position, [], 0, "CAN_COLLIDE"];
_unit moveInGunner _item;
_item doTarget _itemTarget;