Hello, I am working 3d drag game. Character goes slow/fast x axis on different mobile phone resolutions.
For example: it goes really smooth & fast in 1920x1080 but its not like in 1080x720
As far as i know deltaposition are in pixels. Thats why it goes different speed in different resolutions. But I couldnt figured out how can i fix this.
Code;
if (Input.touchCount == 1)
{
Touch touch = Input.GetTouch(0);
if (touch.phase == TouchPhase.Moved)
{
Vector2 touchDeltaPosition = touch.deltaPosition;
TranslateBall(touchDeltaPosition, 0.3f);
}
public void TranslateBall(Vector2 position, float translationSpeed)
{
transform.Translate(position.x * translationSpeed * Time.deltaTime, 0f, 0f);
}