I am trying to fake a nice reflection on ipad by simply rotating an object with the reflection texture. The problem I have is with limiting the angle. I don’t want the reflection to go beyond the 180 degrees limit (the upper half of a circle) because it would go in the shaded part of the object hence rendering it unrealistic.
Here’s what I use now:
function Update () {
var iphonez = Input.acceleration.y;
transform.Rotate(Vector3.forward*iphonez*0.5);
}
As I tilt the ipad left and right the object will rotate nicely. But if I keep it tilted on one side the object will keep rotate the full 360 degrees and more.