Here's an example. Attach this script to the object you want rotated, and in the slider's On Change script choose this script's SliderChange function as the notification target.
using UnityEngine; public class MyScript : MonoBehaviour { public void SliderChange () { transform.localRotation = Quaternion.Euler(0f, 0f, 180f * UISlider.current.value)); } }
You're the one who sets the On Change notification on the slider. If you have two sliders, choose scripts on different objects.hi, thanks for the reply. Manage to get it to work, but it only working on the Z-axis. I tried to change to 180f, 0f, 0f but nothing happen.