Drag and Drop using Touch for Mobile

Hello! I’m looking to implement the same system of dragging and dropping from UI into the scene with preview instance of the object, but for Mobile phone. But i cant… Could somebody tell me please how can i convert the system in the course from PC to MObile version.

Hi there,

Probably the main issue is we use mouse position. You will need to use touch input information instead of the mouse location. For starters there is Input.GetTouch, which will get you the touch information.

From there you will need to determine which mouse information you need to replace with touch information. I would start by reading up on how the touch input works in Unity.

Let me know if you have further questions on that.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms