I need to rotate a cube-map about the-Y axis 180° (x+,y+,z+)->(x-,y+,z-), but I don't know how. I believe I somehow need to manipulate the cube-map matrix from a script, by setting a matrix property, but my understanding ends there. This is what I have help me fill in the blanks please: Code (csharp): function MatrixRotate() { while(true) { yield WaitForSeconds(5.0F); Debug.Log("Flip"); rotateMatrix=material.GetMatrix(____?____).inverse; material.SetMatrix("_RotateMatrix", rotateMatrix); yield WaitForSeconds(5.0F); } } Code (csharp): Pass { SetTexture[_MainTex] { matrix [_RotateMatrix] } }
Your post did really help me. and I can help you in return to fill the blank spaces: I made a small tutorial on rotating textures: http://themaxscriptguy.wordpress.com/2014/11/20/rotating-cubemap-in-unity/https://github.com/theMaxscriptGuy/Unity_Dev/tree/master/CubeMap_Rotation