bin noch schon soweit gekommen, das sieht schon recht gut aus und ich nähere mich der Wand des Farhzeugs schon sehr nahe.
Die Höhe ist noch zu hoch und es fehlen etwas zu zur Wand
Code
- private _poss = positionCameraToWorld [0,0,0];
- private _poss2 = positionCameraToWorld [0,0,1];
- private _intersect = lineIntersectsSurfaces [(AGLtoASL _poss), (AGLtoASL _poss2), objNull, objNull, true, -1];
- private _intersectPosASL = (_intersect select 1) select 0;
- private _surfaceNormal = (_intersect select 1) select 1;
- private _intersectPosAGL = ASLToAGL _intersectPosASL;
- private _xpos = (_surfaceNormal select 0) * 2.2;
- private _ypos = (_surfaceNormal select 1) * 2.2;
- private _zpos = (_surfaceNormal select 2) * -2.2;
- systemChat format ["%1 | %2 | %3",_intersect,[_xpos,_ypos,_zpos],_surfaceNormal];
- _bomb attachTo [_veh,[_xpos,_ypos,_zpos]];
- _bomb setDir getdir _veh;