Timeline for Implementing a homing missile
Current License: CC BY-SA 3.0
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Nov 23, 2013 at 20:23 | comment | added | Loren Pechtel | @Mutoh Real world orbits can be elliptical. I don't think a missile orbit can be, though, as there is no variable attraction with distance. | |
| Nov 23, 2013 at 3:51 | comment | added | Mutoh | @LorenPechtel Orbits, however, can be elliptical, and can show up even if the target remains still. I just needed to find a way to make them less common, because the missiles were pretty much never hitting. | |
| Nov 21, 2013 at 19:06 | comment | added | Loren Pechtel | @Mutoh True, although my gut says that it's in orbit iff the range does not change and the target did not maneuver. | |
| Nov 21, 2013 at 5:47 | comment | added | Mutoh | @LorenPechtel Discovering when it's in orbit is another problem, though. It was a question of either making a refined AI, or a refined mathematical formula. | |
| Nov 21, 2013 at 5:15 | comment | added | Loren Pechtel | @Mutoh ANY seeker missile can orbit if the situation is just right. Different speeds and turn angles simply change the orbit radius. The only way to avoid this entirely is to have the missile alter it's behavior if it goes into orbit. | |
| Mar 29, 2013 at 22:57 | comment | added | UnderscoreZero | Right... that would be why I wasn't finding anything on google... | |
| Mar 29, 2013 at 22:21 | comment | added | Mutoh | By Hunt, would you rather mean Pursuing? red3d.com/cwr/steer/PursueEvade.html | |
| Mar 29, 2013 at 22:15 | comment | added | UnderscoreZero | What you may need to do here is more than just seek and arrival. I tried googling it, but there is one called hunt. You would need to take your current velocity, position, and heading, and determine the desired velocity to hit the target based on its movement. I've been messing with some test code and it looks like I'm getting the problem you're having. | |
| Mar 29, 2013 at 21:26 | comment | added | UnderscoreZero | I usually use degrees of rotation, if you are on target, the desired direction atan2(targety-selfy,targetx-selfx)*(180/PI) is going to be the same as your velocity vector atan2(yVelocity,xVelocity)*(180/PI) I am fairly sure XNA has atan2. and usually if the difference in the angles is greater than 180 I'll add or subtract 360 from the desired direction so it doesn't try to turn the wrong way. | |
| Mar 29, 2013 at 21:04 | comment | added | Mutoh | I tried all matching combinations of increasing turn speed and slowing the missile based on flight time and distance, but it still doesn't work. "[...] but I've found that if I slow the missile, if it's going to miss, as it approaches the target, it effectively tracks and turns quicker and can hit the target" I wish I actually knew how he finds out whether it's 'going to miss', I'm almost certain this is the missing puzzle piece. | |
| Mar 29, 2013 at 18:11 | history | edited | UnderscoreZero | CC BY-SA 3.0 | added 181 characters in body |
| Mar 29, 2013 at 18:06 | history | answered | UnderscoreZero | CC BY-SA 3.0 |