<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Infinity Code Forum — RealTileSetExample & FollowGame with rotation of map]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=2378</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2378&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in RealTileSetExample & FollowGame with rotation of map.]]></description>
		<lastBuildDate>Mon, 17 Nov 2025 10:07:41 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: RealTileSetExample & FollowGame with rotation of map]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9922#p9922</link>
			<description><![CDATA[<p>topLeft/bottomRight come from the current map view, and are calculated based on the center point and map resolution.</p><p>You cannot increase the clipping of the map.<br />But you can manipulate the map zoom and the distance multiplier.</p><p>You can have multiple “cutouts” in only one way - you have multiple maps, each following a different GameObject.</p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 17 Nov 2025 10:07:41 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9922#p9922</guid>
		</item>
		<item>
			<title><![CDATA[Re: RealTileSetExample & FollowGame with rotation of map]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9921#p9921</link>
			<description><![CDATA[<p>Is there a way to change the size of the tile that is shown? I assume the size is calculated by this code: </p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Vector2 distance = OnlineMapsUtils.DistanceBetweenPoints(control.map.topLeftPosition,<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; control.map.bottomRightPosition);</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; // Set tileset size<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; control.sizeInScene = distance * 1000;</p><br /><p>But I do not know where the topLeft/bottomRight Positions are coming from. I want to increase the clipping of the map.</p><p>Alternativly: Is there a way to have multiple &quot;cutouts&quot; of the map? So, cutouts following multiple game objects?</p>]]></description>
			<author><![CDATA[null@example.com (munich_dev)]]></author>
			<pubDate>Mon, 17 Nov 2025 09:49:06 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9921#p9921</guid>
		</item>
		<item>
			<title><![CDATA[Re: RealTileSetExample & FollowGame with rotation of map]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9861#p9861</link>
			<description><![CDATA[<p>Thank you, Alex. That did the trick.</p>]]></description>
			<author><![CDATA[null@example.com (munich_dev)]]></author>
			<pubDate>Tue, 29 Jul 2025 06:43:33 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9861#p9861</guid>
		</item>
		<item>
			<title><![CDATA[Re: RealTileSetExample & FollowGame with rotation of map]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9860#p9860</link>
			<description><![CDATA[<p>Hi.</p><p>To fix the problem, replace FollowGameObject.UpdateMap to:<br /></p><div class="codebox"><pre><code>private void UpdateMap()
{
    // Store last position of GameObject
    lastPosition = target.transform.position;

    // Size of map in scene
    Vector2 size = control.sizeInScene;

    // Calculate offset (in tile position)
    Quaternion rotation = map.transform.rotation;
    Vector3 offset = rotation * (lastPosition - map.transform.position + control.center);
    float offsetScale = map.zoomFactor / OnlineMapsUtils.tileSize;
    offset.x = offset.x * offsetScale / size.x * map.width;
    offset.z = offset.z * offsetScale / size.y * map.height;

    // Calculate current tile position of the center of the map
    tx -= offset.x;
    ty += offset.z;

    // Set position of the map center
    if (Mathf.Abs(offset.x) &gt; float.Epsilon || Mathf.Abs(offset.z) &gt; float.Epsilon) map.SetTilePosition(tx, ty);

    // Update map GameObject position
    map.transform.position = lastPosition - rotation * control.center;
}</code></pre></div>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Mon, 28 Jul 2025 19:15:18 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9860#p9860</guid>
		</item>
		<item>
			<title><![CDATA[RealTileSetExample & FollowGame with rotation of map]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=9859#p9859</link>
			<description><![CDATA[<p>Hi,<br />I use the scripts &quot;FollowGameObject&quot; and &quot;RealTilesetSizeExample&quot;. They work well together. <br />However, by default the map&#039;s north points to -z. For my use case I want to point the map&#039;s north to +z axis. So I added a 180 deg rotation around y. If I do this, the map won&#039;t follow the game objects properly any more but with an offset. I assume this is due the rotation pivot point of the map. </p><p>Is there another way of telling the map which axis should be used as north? Or is there a way to make the FollowGameObject work, even if the map is rotated? </p><p>Thank you</p>]]></description>
			<author><![CDATA[null@example.com (munich_dev)]]></author>
			<pubDate>Mon, 28 Jul 2025 15:36:45 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=9859#p9859</guid>
		</item>
	</channel>
</rss>
