So, I have this method that moves an object relative to finger move through the x axis. It works fine on my 720p phone, however when I try it on a 2k phone like the samsung s6, it moves way, way faster. I’m pretty sure it does not have to do with the performance, since I’m using Time.deltatime.
if (touch.phase == TouchPhase.Moved && gameStarted)
{
transform.Translate(new Vector3((touch.deltaPosition.x * velocityConstant * Time.deltaTime), 0, 0));
}
My assumption is that touch.deltaposition is given on pixel coordinates, even though the official Unity documentation isn’t very clear on that.
How could deltaposition be consistent across all devices, so that it considers world coordinates instead of screen resolution/pixels?
PS: I already tried tinkering with ScreenToWorldSpace, without any success