Ok, here we go.
I am trying to create a turret system in which you have control of a set of turrets at the same time. The turrets will turn in unison with same rotation and gun elevation.
These turrets could be considered to be equivalent to AA batteries on a battleship but with only one operator.
The turrets aren't meant to be AI controlled, they are meant to be player controlled and rotate in synchronization. The objective is not accuracy, but for the player to be able to spray fire in a general direction.
The guns will also fire at the same time.
(if you don't understand, check out any ship in battlefield1942)
I think the hierarchy should be
0 star cruiser 1 game object
2 all add on turrets + control turret
3 camera (sub to control turret)
Not sure on the scripting but have tried to use mouselook and failed
I have been attempting to create my own .js from scratch but cannot stop the first turret (haven't even tried to link them yet) from rotating around the z axis.
I am aware that I need to tell it to rotate in global, not local, space but as of yet I have had no luck.
My plan was to have a control script on the turret with the camera, a variables script on the parent and a follow script on all the other turrets that obtains the rotation and fire commands from the parent.
You can probably do it without the variables script but once again, I'm not sure how.
Any help would be greatly appreciated!!