Quantcast
Channel: Unity Forum
Viewing all articles
Browse latest Browse all 1466670

Scroll Rect, How to move an object without scroll wheel

$
0
0
Hi.

I'm having a major issue with the scroll rect. I seem able to get the scroll rect to scroll through its contents fine with the scroll wheel but when trying to use a button, it seems to keep snapping. Here's the code so far in my Update loop.

Code (CSharp):
  1. if(Input.GetButtonUp("Return"))
  2. {
  3.            
  4.     rect.verticalNormalizedPosition = rect.verticalNormalizedPosition + speed;
  5.            
  6. }
  7.  
  8. if(Input.GetAxis("Mouse ScrollWheel") != 0)
  9. {
  10.     Debug.Log(-Input.GetAxis("Mouse ScrollWheel"));...
Scroll Rect, How to move an object without scroll wheel

Viewing all articles
Browse latest Browse all 1466670

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>