Advertisement
MrsMcLead

rotator with limits, needs help

Dec 6th, 2013
466
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.23 KB | None | 0 0
  1. #pragma strict
  2. var speed = 150.0f;
  3. function Update() {
  4.         if (transform.rotation.eulerAngles.x < 90 && transform.rotation.eulerAngles.x > 10)
  5.         transform.Rotate(0, Input.GetAxis("Horizontal")*speed*Time.deltaTime, 0,Space.World);
  6.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement