r/math•
sanddemon

Space pathing - help a game programmer out

Any help would be appreciated, this problem has been driving me nuts for awhile. I took quite a lot of Math in college but it's been too long since I've used it to this level so looking for some help. Here's the problem:

http://imgur.com/Zk9bM

Let's say you're on a ship on planet A, and you need to make it to planet C while avoiding planet B (2d plane). Pretty simple to do, but there's more. You're facing to the left (hence the arrow) and only have a certain "turn" radius. So you need to leave "A" facing left and wrap around to your end point of planet C. Here's where I'm struggling, I cannot remember at all how to integrate this type of restriction. You'll notice I've let out units for most of this - it's a basic coordinate system but the units are whatever I want.

For some bonus points - the planet B has gravity "pull" and you want to avoid it and account for it in your path.

Help a game programmer out?

Posted Dec 2, 2011, 3:10 AM UTC

27
Loading comments…