I have the following piece of code attached to a cylinder, and it works fine, but every time I run it for some time (a matter of seconds), the On MouseDrag() stops working, not detecting my dragging. Any clues? Code (csharp): static var strength : float; static var oldMouse: float; function OnMouseDown() { oldMouse = Input.mousePosition.y; } function OnMouseDrag(){ transform.Rotate( Vector3(strength,0,0) * Time.deltaTime ); } function Update () { strength = (Input.mousePosition.y - oldMouse); } Thanks a lot!
I just encountered the same problem. but I've not handled the mouse moving off the obj, I'll try and report here...