Hey Everyone,
I've been working over the problem of simulating a "heat-seeking" projectile for a little while now, and I haven't managed to come up with a useable solution. Unfortunately i'm not much of a Math expert, and many of the soultions i've thought out, I don't have the ability to implement. I've also trudged through my fair share of searched sites via Google, and haven't had much luck on the topic. I'll explain the problem:
Simulating a missile outside of Box2D isn't too difficult. You can basically have the projectile head towards its target at a set speed, limit its turning radius and you end up with a beautiful little heat-seeking missile. What's difficult is utilizing Box2D's impulse system to do the same thing. If you have a missile head towards a target, you also have to take into account the missile's momentum it builds up using impulses for when a target inevitability sways away from the missile's initial projection. You'd have to calculate a strong impulse to divert great momentum. What's worse, is if you've managed to simulate a missiles optimal aerodynamics in a zero gravity world, you now have to compensate for the missile travelling downwards at 9.8 meters per second! Rocket Science!!
Another slightly different topic and probably a more difficult one, is the throught of an Airplane. Or to be more specific, the wings, and the lift they would generate when traveling. (Somehow I feel that this would tie into the missile system 1:1. They both are airborne projectiles after all.)
I can picture a system that would apply perpindicular impulses underneath the wings to have a plane lift off when enough speed/force is "gradiently" reached, but there are probably many other forces at work that I simply can't imagine.
Has anyone had any experience with these types of aerodynamics? I'm looking for soultions, or a push in the right direction. I'm not shy of computing mathamatics, It just takes me a little longer than some!
Ben.
I've been working over the problem of simulating a "heat-seeking" projectile for a little while now, and I haven't managed to come up with a useable solution. Unfortunately i'm not much of a Math expert, and many of the soultions i've thought out, I don't have the ability to implement. I've also trudged through my fair share of searched sites via Google, and haven't had much luck on the topic. I'll explain the problem:
Simulating a missile outside of Box2D isn't too difficult. You can basically have the projectile head towards its target at a set speed, limit its turning radius and you end up with a beautiful little heat-seeking missile. What's difficult is utilizing Box2D's impulse system to do the same thing. If you have a missile head towards a target, you also have to take into account the missile's momentum it builds up using impulses for when a target inevitability sways away from the missile's initial projection. You'd have to calculate a strong impulse to divert great momentum. What's worse, is if you've managed to simulate a missiles optimal aerodynamics in a zero gravity world, you now have to compensate for the missile travelling downwards at 9.8 meters per second! Rocket Science!!
Another slightly different topic and probably a more difficult one, is the throught of an Airplane. Or to be more specific, the wings, and the lift they would generate when traveling. (Somehow I feel that this would tie into the missile system 1:1. They both are airborne projectiles after all.)
I can picture a system that would apply perpindicular impulses underneath the wings to have a plane lift off when enough speed/force is "gradiently" reached, but there are probably many other forces at work that I simply can't imagine.
Has anyone had any experience with these types of aerodynamics? I'm looking for soultions, or a push in the right direction. I'm not shy of computing mathamatics, It just takes me a little longer than some!
Ben.