Eriknem

RotateModel

Nov 11th, 2020
914
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.38 KB | None | 0 0
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5.  
  6. public class RotateModel : MonoBehaviour
  7. {
  8.  
  9.     public Slider slider;
  10.     public GameObject model;
  11.  
  12.     public void SliderRotatingModel()
  13.     {
  14.         model.transform.rotation = Quaternion.Euler(model.transform.rotation.x, slider.value, model.transform.rotation.z);
  15.     }
  16. }
  17.  
Advertisement
Add Comment
Please, Sign In to add comment