↧
Answer by robertbu
If your object is only rotating on the 'y' axis, you can do: var euler = transform.eulerAngles; euler.y = Mathf.Clamp(euler.y, 5.0, 17.0); transform.eulerAngles = euler; The problem is significantly...
View ArticleAnswer by christoph_r
How about this? function Update () { if (CFInput.GetKey(KeyCode.W) && transform.position.y <15) { rigidbody.velocity.y = speed; } else if (CFInput.GetKey(KeyCode.S) &&...
View Article