Help, Rotate with two fingers

void Rotate()
	{
		Vector3 diff = touchPos[1] - touchPos[0];
		angle = (Mathf.Atan2(diff.y, diff.x));
	    transform.rotation = Quaternion.Euler(0f, 0f ,Mathf.Rad2Deg * angle);
	}

how can I make it to only increase/decrease its rotation.
I only need it on z axis.

I recently used this: DetectTouchMovement

Works great in my opinion, wasn’t that hard to use.

1 Like

worked great thanks :o

makes my object go crazy on the Z exe