Make touch drag more intuitive/smooth for AR-Application
I am currently working on an app to augment pictures on a vertical plane. Once the vertical plane is placed, the user is able to put an object on the plane. The placed object can be selected and dragged on touch - so far everything works fine.
void MoveSelected()
{
Vector3 curPos = cam.ScreenToViewportPoint(Input.touches[0].position);
Vector3 lastPos = cam.ScreenToViewportPoint(Input.touches[0].position - Input.touches[0].deltaPosition);
Vector3 touchDir = curPos - lastPos;
touchDir.z = 0;
curSelected.transform.position += verticalPlane.transform.TransformDirection(touchDir);
}
However, the dragging is not very intuitive and i would like to make it more smooth. For example, if i scale down the object, dragging becomes very slow. Is there any way to improve my method?
Im using latest ARFoundation, Unity and im testing on Pixel 2.
Thanks
Your answer
![](https://koobas.hobune.stream/wayback/20220612235653im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Help with touch button (can't call a function) 0 Answers
UI blocking 0 Answers
Rotate object by touch using Angles? 0 Answers
How to get the touch controls to work smooth and properly in FPS android gamemobile Game? 1 Answer
Android 2D slingshot with position relative to where the user touched? 0 Answers