Rotating a skybox with mouse look.

I’m looking for a method to rotate the skybox along the x or z axis that also takes into consideration the mouse look component.

I’ve tried the second camera technique and I can get the skybox to match the main camera’s view, but I can’t seem to figureout how to add in a constant rotation around the x or z axis. The techniques I’ve tried have resulted in a uniform rotation regardless of what direction the camera is pointed.

rotationValue = new Vector3(WorldMapCamera.transform.rotation.eulerAngles.x + turnVal, WorldMapCamera.transform.rotation.eulerAngles.y, WorldMapCamera.transform.rotation.eulerAngles.z);

The problem I’m having is that the skybox is always rotating in the same direction regardless of what direction the main camera is looking (via a mouse look script).

To be more specific, I’m trying to rotate the skybox around a space station. I don’t want to spin the space station since it contains a terrain (which from what I’ve read can’t be rotated. )

I was able to “rotate” the skybox (perceptively anyway) by creating a new top-level Game Object and putting everything else inside it, including the camera, then rotating this the opposite way that you want your skybox to appear to move.

Why does it need to be synced with the mouse look??

Just do something like this in Update():

skyboxGO.transform.rotate(0.5f);