Turrets always facing to South-EastFixed
Hey,
maybe someone can fix that the turrets faceing the player and not the southeast of the map?
Dont know how to do it :)

Best regards,

BattleSheep
I have found that as stated with another comment that at the time turrets only wanted to face south east as they spawned, this was becase of a line of code inserted that was not fuctaning correctly.
I have found a tempery fix that allows full rotation but it means that in some cases the turrests are unstable and will make neighboring turrets if thay are placed unstable as well.

Before:
BaseEntity turret = GameManager.server.CreateEntity(TurretPrefab);
turret.transform.position = pos;
turret.OwnerID = player.userID;
turret.transform.LookAt(player.transform);
turret.transform.eulerAngles = new Vector3(0, -turret.transform.eulerAngles.y, 180);
​
After:
BaseEntity turret = GameManager.server.CreateEntity(TurretPrefab);
turret.transform.position = pos;
turret.OwnerID = player.userID;
turret.transform.LookAt(player.transform);
turret.transform.Rotate(-45, 0, 180);
PrintToChat("Turret Placed");​

When looking over the code, the one section that appears to be not working is:

-turret.transform.eulerAngles.y

As this is what is supposed yo be controlling the rotation of the turret.

I hope this helps in the mean time.
R34P3R

Update coming
Locked automatically