# Given a 3d goal point and a turn rate in radius, find max speed to reach goal

I'm working on a 3d space sim with AI agents flying ships through space. I am trying to get them to follow a waypoint path nicely, which involves figuring out how fast they can be travelling and still manage to pass through the waypoint.

Given a point in 3d space and an an agent that only travels forwards and has a given turning rate in radians / second and an acceleration rate, how can I find the maximum speed the ai can travel and still manage to face the point before overshooting it?

Can any math wizards lend a hand?

public class AIPilot { //relevant fields from my class
float acceleration;
Transform transform;

public float FindMaxSpeedToFace(Vector3 goal) {
//trying to fill the body of this method
}
}

• "acceleration rate in meters / second" you mean velocity? acceleration is measured in ( m / (s*s) ) – dnk drone.vs.drones Sep 15 '15 at 8:05
• Is it assumed that the ship starts with zero velocity? What do you exactly mean by overshooting - should the ship have zero velocity when reaching the end-point? I fear that there might be no analytical solution for that. – Wumpf Sep 15 '15 at 18:09
• We can assume the ships start with zero velocity, they don't but once I find a maximum speed I can figure out if I can hit that speed based on my current velocity. What I mean about overshooting is that the agent should not miss the target and need to circle back around. Arriving is not the goal here but I know that for some points in space a near zero speed will be the maximum speed to reach a point. – weichsem Sep 15 '15 at 19:26