Raycast Turret Placement Tower Defense

1409636--73604--$towerDirectiionsunity.jpg

HI

As you can see in the image above I’m having a little problem with the direction my towers are facing. This particular tower is a freeze tower that is static(meaning it does not rotate or target the enemy). Basically what i want to do is have the tower always face in the direction of the path. Any suggestions on how i would do this possibly using raycasting or colliders?

Now i have more the one type of tower, the other types rotate and target the enemy so there is no real issue on which direction they are facing.

You must have some means of identifying nearby path? Maybe there’s a unique collider you could check for with Physics.OverlapSphere(), or a set of navigation points, or what have you. Whatever it is, you could compare against nearby path segments, find the nearest one, and face that direction.

Actually no I do not have a means to identifying the path. If you notice the small planes with blue glow that is where the towers go (obviously) the path is there for the enemies to follow, and the planes are placed along the path. Through the use of triggers the towers target and attack the enemy within 180 degrees.

Is there a way using the method you suggested in making sure the freeze towers always face the correct direction?