zooloo75 834 Posted March 25, 2022 Hi everyone, I'm trying to attach an object to a unit at the exact position they were hit, via the HitPart event handler. I'd like for this attached object to follow the rotation of the selection that was hit as well. So far from my experimenting, the attached object is not accurately placed where I shot the unit. I've tried various LOD indexes, and the different `selectionPosition` syntaxes but have had no luck. It seems impossible to attach an object to the exact position a unit was hit at and have it maintain a relative transform to the bone/selection that was hit. Has anyone else tried doing something like this successfully and could give some advice? Thanks. Share this post Link to post Share on other sites
Harzach 2517 Posted March 25, 2022 Heya, I was fooling around with this a few years ago. This is as far as I got: this addEventHandler ["HitPart", { (_this select 0) params ["_target", "_shooter", "_projectile", "_position", "_velocity", "_selection", "_ammo", "_vector", "_radius", "_surfaceType", "_isDirect"]; _arrow = createVehicle ["Sign_Arrow_Direction_F", [0,0,0], [], 0, "CAN_COLLIDE"]; _arrow attachTo [_target, [0,0,0], _selection#0, true]; _arrow setVectorDirAndUp [_vector, vectorUp _arrow]; }]; It is about as far from perfect as is possible, but maybe it will give you some ideas. Good luck! Share this post Link to post Share on other sites
froggyluv 2136 Posted March 25, 2022 Oh boy the King is back baby! Gotta guess finally going for the holy grail of bloody bullet impact points 2 Share this post Link to post Share on other sites
Harzach 2517 Posted March 25, 2022 51 minutes ago, froggyluv said: Oh boy the King is back baby! Gotta guess finally going for the holy grail of bloody bullet impact points I'm thinking spearguns! And scuba shorts! Share this post Link to post Share on other sites
zooloo75 834 Posted March 25, 2022 1 hour ago, froggyluv said: Oh boy the King is back baby! Gotta guess finally going for the holy grail of bloody bullet impact points You are correct! I've wanted to do this even before BloodLust. Would be nice to have something like Max Payne 3's impact wounds. The new scripting commands since then make this seem more possible, but it looks like there are still blockers for this. 1 1 Share this post Link to post Share on other sites