Aircraft Countermeasure Physics

How would I make the physics for Aircraft countermeasures like Flares, I know to make Chaff work but I don’t know how I should calculate Flare velocity.

Depending on where the flares are supposed to deploy, I would try dividing the aircraft on its three axis. Normally the aircraft would be moving forward on it’s X axis, and it imparts that momentum onto the flare once it deploys. If the flares comes out from behind the aircraft, shooting straight out the back, You can perform a subtraction from Velocity X from the plane minus the initial velocity of the flare.

If it comes out the side, say the right, You can conserve velocity x and add velocity z on the flare, and let the games gravity take care of having the flare fall.

Hopefully this helps, More details would help as well.

I think what I am trying to say is trying to figure out how much of that x velocity should I give it

because it also has velocity on the vertical axis

OK. Here’s what i’m thinking.

Lets give the aircraft its velocity value X. In real life, many commercial aircraft can do 250 nautical miles per hour (Knots) without stalling. Lets make X Velocity = 250

Then, the initial velocity of our flare, can be said to accelerate up to 400 Knots. We can instantly add the flares velocity onto the flare, and depending on where the flare is positioned, we can add or subtract from the planes velocity. For example:

Straight behind the aircraft we will subtract from the planes velocity:

local FlareVelocity = 400
local AircraftXVelocity = 250

local TrueFlareVelocity = AircraftXVelocity - FlareVelocity

Flare.Velocity = TrueFlareVelocity

There is an instance called velocity and it can be added onto the flare part to give it momentum. It also can be configured to impart this momentum on a certain axis relative to the world. For Angled shots, where it fires diagonally it will require knowing the velocity on both axis or all three. A 45 degree shot will need X and Z axis velocities (In this case they’re equal).

Another Idea I have is to use an explosion instance, it will automatically calculate where the flare will fly depending on where it is positioned behind the flare, Manipulating the explosion force changes how far the flare goes.

Thats all I got for now.

okay thanks for the help but isn’t velocity read only currently?

Im not sure, It probably isn’t though. If it doesn’t work, there are tutorials on how to impart momentum onto parts on Youtube.