Im creating a difference value from the Start.Y of a touch and how far the touch has moved along the Y axis. Touch.Start.Y - Touch.Absolute.Y. The Start.Y is a global variable. When a touch is dragged down the screen of a mobile device the value is negative. I need to convert this value to a positive so I can add it to a group of sprites Y axis and make the sprites move down just like when you drag down on a mobile browser window and everything moves at the same time. I won't hold my breath for a reply being it sounds so confusing haha! Thanks anyway if anyone does attempt to answer.
the value is negative. I need to convert this value to a positive
you can try abs.
Develop games in your browser. Powerful, performant & highly capable.
Do you want to try Scroll behavior?
or something complicated?