Copy world rotation cordinate

I have a cannon and I need to be rotated as the main camera, how can i do this?
sorry for bad english, i’m italian

If it’s C# it’s like robertbu said, but try:

"Cannon".transform.rotation = new Quarterion(Camera.main.transform.rotarion);