Finished up the vehicle AI I've been working on for this job, and I'm really proud of the work that I've done. But I swear sometimes the Unreal Engine makes me go...



Just to give you an idea of the craziness, here's ONE line from the pathfinding code I wrote this week:

TargetPoint.SetLocation(IIPathPoint(MoveTarget).Pr evPathPoint.Location + Normal(MoveTarget.Location - IIPathPoint(MoveTarget).PrevPathPoint.Location) * (((MoveTarget.Location - IIPathPoint(MoveTarget).PrevPathPoint.Location) dot ((Pawn.Location + (vect(82,0,0) >> Pawn.Rotation)) - IIPathPoint(MoveTarget).PrevPathPoint.Location)) / VSize(IIPathPoint(MoveTarget).PrevPathPoint.Locati on - MoveTarget.Location)));
That's just to figure out where the car is SUPPOSED to be. It's all working great now though, and now the AI aren't acting like drunk drivers anymore!