<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — RawImageTouchForwarder incorrect with non-centered pivot]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2429&amp;type=atom" />
	<updated>2026-07-30T16:05:07Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=2429</id>
		<entry>
			<title type="html"><![CDATA[RawImageTouchForwarder incorrect with non-centered pivot]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9993#p9993" />
			<content type="html"><![CDATA[<p>Hi,</p><p>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.</p><p>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.</p><p>The issue is in RawImageTouchForwarder.cs, inside the ProcessTouch method. This line assumes that the pivot is always centered:</p><div class="codebox"><pre><code>localPosition += sizeDelta / 2.0f;</code></pre></div><p>Replacing it with:</p><div class="codebox"><pre><code>localPosition += sizeDelta * image.rectTransform.pivot;</code></pre></div><p>fixes pointer input and cursor-targeted zoom for any pivot.</p><p>Could you please review and include this fix?</p><p>Thank you.</p>]]></content>
			<author>
				<name><![CDATA[sviudes]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=4058</uri>
			</author>
			<updated>2026-07-30T16:05:07Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9993#p9993</id>
		</entry>
</feed>
