How to rotate a skybox

Hello,

I am just digging into world building in vrchat again, and I am finding a small issue. I really want a moving skybox…So, I have been trying to rotate the skybox, which does work in the Scene player with the VRC simulator on Unity.

However.

When I build and run it on Vrchat to test it, the skybox does not move at all.

Any help would be great, cause i have been hitting this wall for a few days now and Really wanna find an answer.

Handy tute here for rotating an HDRI skybox with a script: https://youtu.be/ZBf_e4Rr7h4?si=sghD9c1Bn5hU4aO_. TBD if it works with VRC, but give it a go.

1 Like

Can confirm it works, I used that script on my world.

Feel free to reuse/adapt/change.

using UdonSharp;
using UnityEngine;
using VRC.SDKBase;
using VRC.Udon;

namespace Thelvaen
{
    [UdonBehaviourSyncMode(BehaviourSyncMode.None)]
    public class SkyBoxRotate : UdonSharpBehaviour
    {
        [SerializeField] private float RotateSpeed = 1.2f;
        public void Update()
        {
            RenderSettings.skybox.SetFloat("_Rotation", Time.time * RotateSpeed);
        }
    }
}
2 Likes

Thank you so much !!

my pleasure :)