So I’ve been struggling for years on how to get an object to move relative to touch delta horizontally in a smooth way, and my best attempt so far has been this:
if (touch.phase == TouchPhase.Moved)
transform.Translate(new Vector3(((touch.deltaPosition.x/screen.x) * velocityConstant * Time.deltaTime), 0, 0));
What I’ve done here: the ratio of the deltaPosition over screen.x pixel count is to normalize deltaPosition across screen sizes, and velocityConstant is a multiplier to move the object further than the actual movement.
Nonetheless, it is jittery, unpredictable and very, very inconsistent. All in all it doesn’t behave like it should.
All I need is a movement relative to finger slide that moves further than the actual touch slide (hence why I say it’s “relative” and not the exact length).
Any help is appreciated.