turn around 90 curve with forward/rotation

I'm trying to do some kind of tower defense game.

The map is created from blocks (prefabs) and then combined.

In each corner there's a waypoint-GameObject so the Enemy knows its path.

the movement is achieved by translation (speed * Time.deltaTime).

I'd like to achieve a smooth turn around the 90-corners while keeping the speed (as variable in the enemy-Object). what's the optimal way to achieve this? Do I need to use complicated trigonometry to calculate each movement segment around the curve (if yes, are there any examples, and isn't this too cpu-expensive if there are many objects turning at the same time)?

Any ideas?

Here's a little illustration how it's supposed to be: (movement along the black line, curve between the blue lines, waypoint in magenta. the red lines are on the texture (ignore them))

alt text

Here are some options for how to round corners:

  1. Include more waypoints and fake a curve. Simple, but awkward.
  2. Include a directions to raycast against for corner sections. Assumes you know the structure of your walls, that you have colliders and adds raycasts, making it simple, but costly.
  3. Set up a bzier curve or NURBS system for your waypoints. Less simple.
  4. You could use iTween which has all of the facilities needed for this. Simple (Look into PutOnPath, PointOnPath, MoveTo with movetopath).

You should not need to use trig, unless you calculate the texture's curves at runtime.

What you could do is determine the turn rate for the object. To do this, you will need to know the speed of the object and the radius of the turn. Calculate the circumference of the circle that the curve is part of, divide it by 4, and that is the distance the object will need to travel. Then, divide this number by the speed of the object, to get the amount of time the object will take to move through the curve. Then, divide the angle of the turn by this time, resulting in the amount of degrees per unit is required. Then, add this number (divided by deltaTime) to the correct rotation every tick.