animating missile tracking

hi all, I’m wondering what methods are out there to get a missile to track a target without taking forever key-framing each one.

i came up with a method that seems to work ok if not a bit hard to refine. it involves placing hooks on each of the paths verts and then limiting the distance between one empty and the one previous with clamp region set to “surface” to keep the path length from stretching or shrinking (which results in the missile slowing down or speeding up inexplicably)

then each hook is told to copy the location of the target
this method works best if the target are headed toward each other, if the target is moving sideways it can appear unrealistic with the missile sliding sideways with out turning enough

any improvements on this or new ideas are welcome

cus with a name like missile swarm not being able to do missiles is kind of embarrassing

Hi, yes it is funny, because there are several ways to do that stuff, and one of these ways uses a script called Swarm !

I can’t find it out on this computer. It is a shame, I know that I have used it in the past.

You can also use a curve for the missile trajectory and use a modifier like the Follow path constraint, or the Clamp to constraint. The curve modifier is also usable, but you will have to apply it to an intermediary object and use this object to support your missile, and it is not so practicle.

An other solution is using the particle system and the Boids Physics : it allows to chase object with particles (particles can be objects too).

However, the simpler sotution is to use a curve and a constraint. The Clamp To constraint is my preferred : Apply it to two Empties. These two empties will be parented to a third one. This last one will have a LocX or LocY Ipo and you will adjust the speed with it. It is more practicle than the Follow Path which has a Speed Ipo. Put the Object center in the Head of the missile, and parent it to the first empty. Selct the good axis for the object tracking directionandApply a Track To constraint to your missile with the second empty as target. Move the second empty on the curve with LocX or LocY to get it right on the curve.

The curve can be set to 3D.

there is more than only 1 swarm-like scripting

searching in the sub-forum: Python & Plugins
finds more.
But i think one good start is here:

if the links there (alienhelpdesk) are not workint, i can upload the swarmtest.blend (incl. the script) …

btw. why the hell is no good(easy) way to check the forum for such good examples? I would like to see a way to list attachments and search, because most of the time the searching for postings results in too many hits (a few pages full of … ) or nothing …

thank you for your responses they were very helpful

i saw a youtube test of swarm and was excited for the possibility (though butterfly and rockets behave sightly differently)

i looked for swarm online and all i got were broken links. could i bother you to upload your copy please? thanks so much for offering

PS: i agree with you about the search engine being frustrating

uploaded it, you find it here:

ps. i put it in this thread, to find my uploads in one thread …
because i dont know how to add an already uploaded thing into another posting… (forum-noob?)

thank you for posting the file
when i try running the game engine side of blender “p” in obj mode… nothing happens

at the bottom of the script window is a red question mark that reads "external test is out of synk “click to resolve problems” --> “make text internal” or “recreate file”
recreating the file doesn’t work and making the text internal dosnt seem to do anything

im guessing that the red “?” is a bad thing
any ideas
sorry for the trouble and thanks for all your help

im going to keep poking at it maby it will do a trick

that is true!
RTFM! … You know?

who told you to run the game-engine?
for the file swarmtest.blend move the mouse over the window-part
with the texteditor and the script !- there you have to start the script
and this is done with ALT-p

the meaning of the “?” in the text-window only says, that the text
in the text-editor was once loaded from disk and now the version
on the disk has changed(maybe deletetd or modified … etc.)
This hint is a good blender-feature if one works with a central
script-file for different blender-files. Then, if you make any
changes to this version and open the blender-file, blender
notice there is a change and you can do a reload to get the
up-to-date version without the work to cut+copy+paste
the changes into the text-editor.

I hope this made it clear … understandable …
(english is not my mother-language)

wow im a noob. you need the mouse in the script window for it to work gah
yes it did a trick and i will have fun i think figuring out how to get to do what i need it to do,

the script is well commented so it shouldn’t be to bad
thanks so much for your help you guys

and yes that did help me under stand a lot

edit: i have posted the ships that i have so far in another treadhere