New answers tagged direction
One easy way to do this is the following algorithm that is executed each tick: if (the target is straight ahead) then keep flying straight on else rotate a little bit towards the target It's easy to see that this algorithm works... but we have to talk about what "a little bit" means. Certainly, there's a maximum angle you want your plane to turn ...
As hinted by user concept3d, it is difficult to help you without further details about your implementation approach. I'm going to give it a shot nevertheless, but that means that I have to make some assumptions that may or may not be true for your code. In any event, I hope that the following is general enough that you can adapt it if necessary. The first ...
I would look into using a Bezier Curve. You can have easy curves like you show above, or more complex curves (even nested) using Bezier splines. The algorithms are pretty straightforward and explained well on Wikipedia :)
If I were you, I would use a simple algorithm to point the aircraft at the target. You can use a turnrate variable to keep track of how quickly it is turning. This is something I am using in my project. Within the update method, calculate the projected heading a few seconds in the future. If the projected heading has not passed the target heading, increase ...
Top 50 recent answers are included