Homing rockets

Started by
11 comments, last by Jernej.L 18 years, 9 months ago
Sidewinder missiles will over-correct by 15 degrees, the heat sensors (I think it's an array of like 128 by 128, lower on earlier versions) pick up the heat as the missile rotates, and kind of zig-zag up to the target. You might try to have a 30 degree arc divided into two, then have the missile either slightly up, or down at certain intervals until that zone loses contact. Like the upper zone causes the missile to steer upward, then loses contact, so the missile then thrusts down until the lower zone loses contact (and explodes if both zones lose contact, meaning the missile has overshot the target, or is beside the target)

Check out http://www.howstuffworks.com it's got all kinds stuff about sidewinder missiles and what-not
"Think you Disco Duck, think!" Professor Farnsworth
Advertisement
Quote:Seek attempts to steer a vehicle so that it moves toward the goal. This is in contrast to a central force (such as gravity) which causes an inward acceleration and so leads to orbital motion.

Linky

Tip: Look into "Seek And Flee", "Pursue and Evade", "Obstacle avoidance" and finally "Combining behaviours" in his gdc paper from 99. Better yet, read the text in the paper and watch the animations on the homepage(the text in the paper is easier to understand).
This will give you a great missile that homes to where the character is going to be and avoids obstacles :)
i got this in this same forum while ago.. i never tested it but it should work i think, tell me if it does.

// gamedev - homing missles:

//starting position
//bullet speed
//target position
//target velocity
//Vector2D LeadTarget( Vector2D sp, float bs, Vector2D tp, Vector2D tv )
{
Vector2D D = tp - sp;
float E = D.Dot( D );
float F = 2 * tv.Dot( D );
float G = bs * bs - tv.Dot( tv );
float t = ( F + sqrt( F * F + 4 * G * E) ) / ( G * 2 );

return D / t + tv;
}

Projects: Top Down City: http://mathpudding.com/

This topic is closed to new replies.

Advertisement