Missile Physics
-
So, I stumbled on a few limitations of FL which I wondered whether they could be cracked open. (Yes, I know, this is mainly aimed at adoxa anyone who may have an idea is welcome though )
Firstly, when you have a motor with a delay > 0, the missiles seem to suspend any and all physics calculations. They stand utterly still, not even following the ship’s speed. When the delay time has elapsed, they suddenly jump to a new position (I assume this is the position they should’ve had at that time had they not stood still). The missiles do not appear to consider the muzzle_velocity or ship speed during that time, which is puzzling. Has anyone managed to alter this behavior?
Secondly, missiles have a seeking field of view (fov). For some reason, values greater than about 300 degrees tend to make the missiles not track at all. The value is a full field of view, so I assume 180 degrees would mean it can track anything in front of it and to the sides, but nothing behind. 360 degrees would track anything.
I’ve stumbled into this because I wanted to make missiles with a very particular trajectory: they would have to be fired from a fixed angle (defined by the hardpoint), would move in straight line for a few moments and then start tracking toward their target. Apparently, most of the ideas I had won’t work
Suggestions, thoughts?
-
Yep - stop trying to defy the Sacred Laws of FL!
Heheheheh…
Good luck anyway. I have no idea and no time to help test.
-
I believe that’s part of the anticheat Hook plugin, but unfortunately since I don’t have the source I can’t recompile it for Hook 1.6.1, which is what I use for a host of reasons.
EDIT: Another thing I’ve noticed: the missile trails always seem to start at some random point (center of the system? last base docked?) and then flash to the launcher’s location. It looks really odd…
-
Ya, I’ve noticed that too. Not really sure why it does that, either.
-
Firstly, I was going to say I don’t experience that, but then I remembered to test multiplayer. Unfortunately, that’s not my area. Can’t say I noticed the trail, but again, probably a server issue.
Secondly, it stores the cosine of seeker_fov_deg, so that makes 0 and 360 the same; 180 is the best you can do.
I don’t think delay would do what you want - it simply delays motor acceleration. i.e. initial missile speed = ship speed + [Munition] muzzle_velocity; after [Motor] delay seconds, it accelerates for [Motor] lifetime; after [Munition] lifetime, it explodes.
-
Thanks for the FOV.
As for the delay, that’s precisely what I’d want it to do; the problem is that it doesn’t do that. When the missile fires, it stays in place no matter what the muzzle velocity is. When the delay expires, the missile jumps to where I feel it SHOULD have been with the muzzle velocity, and then it accelerates.
-
Have u tried it without the anti-cheat plugin?
-
Both with and without to no effect.
-
You ARE able to use FOV higher than 180 and still have it track right. I’ve used up to 345 and it works fine, I have used it in a 90 degree offset fire missles were it fires out of the side of a Custom ships known as a Serafina from 88Flak. The missle would then track to the target and hit it in a really neat arc. Except it would never hit if fired in a debris field as it would hit debrie instead.
I have also used up to a 45 degree fire angle and 320 degree FOV and had it work and track right with no errors.