Calculate Velocity of a part, and reaim the missile to intercept (Anti-air missile) (Easy solve 4 u)

I’m trying to make a rocket that can be launched from a platform, flies into the sky towards the target, and intercepts the flying target, I wanna make it realistic and have angular restrictions so it takes a while to turn.

I’m planning to use a bodyforce and have it accelerate more and more until it intercepts with the target.

I do already have a formula and equation for all this, just not quite sure how to make the missile itself, reach there.

So just to get started, have any ideas on how to make a accelerating bodyforce that increases on its lookvector?

Anybody have a idea? Stillhaving this problem 3 days…

Apologies for the late reply, I’m really busy with exams right now.

To make it realistic, you’d need to create a PID controller and stuff, in addition to simulating aerodynamics.

You could use the built in PID physics in an AlignOritentation with a reduced force, that’s what I would use. Then just have a body force set to apply force on the axis. You might need to have the align orientation also have a slight upwards angle modifier to counteract gravity. You could calculate that using trig and the body force, ignore it (with enough force and updates it should work either way), or just add an upwards force of mass*gravity to make the missile not experience gravity.

So TL;DR: Have an align orientation aim the missile at the predicted location. It kind of gets more complicated, because you’d need to do another Euler-like approximation for the missile flight time which you would feed back into the future position equation.

1 Like

Dude. Im in 9th grade i cant do all this, can you do some function magic again, I looked into PID forces

Proportional–integral–derivative

Couldn’t understand it but i got the jist of it.

For the bodyforce how would i get the axis’s and etc, And what even is a angle modifier?
Could i get a function for this, or would i need to contact some mathmatician for this?