Quote:Original post by Staryon
Could you give me more details about how to calculate RadiusA(T)?
The max speed should be included there, right?
Radius is just the possible distance A can travel, with no information about the direction it is pointed.
So maxSpeedA*Time = radius.
In reality, since this is a car, and cars cannot make sharp turns instantly, rather than a circle of possible locations A can reach, it is probably really a irregular shape like a Cardiod (heart shape) or some kind of oval.
But since this calculation is going to be repeated each gameloop, the approximation should be good enough. If you want to be safer about it, you can Under-Estimate the radius of A's interception circle... and multiply it by .9 or something to give a saftey margin.
Regarding Vectors
generally, a Vector does not include a 'heading' value, but if you want to save that information too, it shouldn't hurt. Just make sure the heading really matches up with the x,y information when they change.