Topic: RawImageTouchForwarder incorrect with non-centered pivot
Hi,
I am using the same setup as the Tileset on UI example: the Tileset is rendered to a RenderTexture, which is displayed in a UI RawImage using RawImageTouchForwarder.
My RawImage is anchored in the top-right corner and has a pivot of (1, 1). With this pivot, pointer input is only detected near the top-right area, and zooming is not centered on the cursor.
The issue is in RawImageTouchForwarder.cs, inside the ProcessTouch method. This line assumes that the pivot is always centered:
localPosition += sizeDelta / 2.0f;Replacing it with:
localPosition += sizeDelta * image.rectTransform.pivot;fixes pointer input and cursor-targeted zoom for any pivot.
Could you please review and include this fix?
Thank you.