<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Mouse Input Query]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=2318&amp;type=atom" />
	<updated>2024-10-06T11:22:48Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=2318</id>
		<entry>
			<title type="html"><![CDATA[Re: Mouse Input Query]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9670#p9670" />
			<content type="html"><![CDATA[<p>Hi.</p><p>An example of how to create markers using the right mouse button:<br /></p><div class="codebox"><pre><code>using UnityEngine;

public class CreateMarkerByRMB : MonoBehaviour
{
    private void Update()
    {
        if (!Input.GetMouseButtonDown(1)) return;
        
        double longitude, latitude;
        if (!OnlineMapsControlBase.instance.GetCoords(out longitude, out latitude)) return;
        OnlineMapsMarkerManager.CreateItem(longitude, latitude, &quot;Marker&quot;);
    }
}</code></pre></div><p>Moving the map using the left mouse button is a built-in behavior and you don&#039;t need to do anything for it.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2024-10-06T11:22:48Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9670#p9670</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Mouse Input Query]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=9669#p9669" />
			<content type="html"><![CDATA[<p>Hi,</p><p>As per my design requirement, I need to add <br />- right click to add the marker <br />- left click and drag to drag the map</p><p>i need to understand what will be the correct way to achieve this.<br />Thank you.</p>]]></content>
			<author>
				<name><![CDATA[ag82lus]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2830</uri>
			</author>
			<updated>2024-10-04T13:01:29Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=9669#p9669</id>
		</entry>
</feed>
