How can I rotate a skybox's material so it simulates slow movement of the sky? Does anyone have a script that does this? I have a script that can animate UV's but it won't let me apply it to a material or a skybox.
Below is the UV animation script...maybe someone can modify it to animate the UV's of a skybox?
//Scroll main texture based on time
var scrollSpeed = 0.5;
function Update() {
var offset = Time.time * scrollSpeed;
renderer.material.mainTextureOffset = Vector2 (0,offset);
renderer.material.mainTexture.wrapMode = TextureWrapMode.Repeat;
}
Any help is greatly appreciated. Thanks!
Shawn
haha ya I inserted my text inside the quotes for the code...but it kept refusing to properly format...do I need to do anything specific to get them formatted properly? thanks for your help, I appreciate it
Sorry for digging up an old question that is also answered, but i would like to contribute my solution too.
What i did was to create a second camera, set the depth to be less than the depth of the main camera, at the main camera i set clear flags as “depth only” while the second camera would have clear flags set as “Skybox”. then a simple script for the second camera’s rotation and you get the effect that you want.
Thank you, I had no clue on how to do this until I tried your solution and it worked. I just created an account here to say thanks to you.
I didn't want to downvote you. =( This should have been an upvote. I do appreciate your help. I am sorry. It won't let me remove the downvote either. So I accepted it as a correct answer instead. I hope you understand.
But yeah, I'd rather you read it than I explain it wrong, but I might be wrong, but meh.
Good luck! =).
Ya I've read all of those. I've looked everywhere. I understand Skybox's and the multiple ways to create them. I just don't know how to animate the actual textures of the skybox to simulate movement. Thanks for the links though, I appreciate it. Shawn
haha ya I inserted my text inside the quotes for the code...but it kept refusing to properly format...do I need to do anything specific to get them formatted properly? thanks for your help, I appreciate it
– Velketor