Answer the question
In order to leave comments, you need to log in
How in OnDrag to make it possible to move an object not all over the screen, but only up and down (Unity3d, C#)?
With public void OnDrag(PointerEventData eventData)
{
transform.position = eventData.pointerCurrentRaycast.screenPosition;
}
the object will move all over the screen, but only up and down. Tell me how to do it?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question