Bubbus / ACF-Missiles

Racked munitions for ACF
MIT License
24 stars 13 forks source link

S-24 Rockets flying back #121

Open ghost opened 5 years ago

ghost commented 5 years ago

When I was building artillery and shooting at the sky, the rockets turned around and blew me and my truck up, what the hay?? With other rockets everything is fine, please fix that.

MechanosG commented 5 years ago

Are they fly by wire? If for some reason they were fed a vector on or near your vehicle's position, they'd turn around and shoot the vehicle like that.

ghost commented 5 years ago

No, when they run out of fuel they fly back, I only used the Fire and Reload input. Here is video https://www.dropbox.com/s/mwwq0lgfnfzu2vh/gm_vista%202019-2-4%2020-32-20.webm

MechanosG commented 5 years ago

Hmm. Looking at the lua, S-24 ASR has a fairly high finmul at 0.02 and really small dragcoef (which not all rockets even have, might make the rocket not drop much?). If I had to guess, when fired at an extremely high angle, once it runs out of fuel, it glides for a while barely dropping at all, slowing to a stop due to gravity, then turns around on a dime and glides back at you. Are you sure other rockets like the SPG-9 or Zuni don't do it also?

Anyway, seems like it could be a bug related to missiles having "fin" strength even at slow speeds. You can reproduce the same thing with a fin plane with 0 lift and strong enough fins. Physgun it at a steep angle, it'll glide a bit, stop, then fly right back down at you, eventually turning around via it's tail fins. I wonder if missiles have their own flight algorithm or if they use ACF's projectile code?