I am developing a pong game for android mobiles having 2 slider and want to assign movement of individual slider corresponding to its current position
I tried some code for the movement of these sliders using OnMouseDrag();
void OnMouseDrag()
{
Vector2 mousePos = Camera.main.ScreenToWorldPoint(Input.mousePosition);
transform.position = new Vector2(transform.position.x, mousePos.y);
}
I got the movement for the sliders but problem is that, I can only slide one slider at a time But I need to move both the sliders at the same time using both hands because this game is getting developed for android mobiles environment.
please Help....