Turret aming to the wrong plase.

I made a simple turret. The turret aming at you and shooting.

The problem is that the turret aming to the wrong plase becouse it’s local Z axis is pointing upwords and not front.

Here some pictures for you to know how it looks like:
5066-help1.png

When it is aming (pointing down and it’s top part aming me):

5067-help2.png

There is any code that can fix it? I tried to export the modle from Blender on other axis but it didn’t changed anything.

well you can be my quinea pig because ive been playing with this section of the reference

this might fix your problem

transform.rotation = Quaternion.FromToRotation (Vector3.forward, Vector3.up);

in my theory this should clamp your forward vector to your up vector