<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Infinity Code Forum — Usage with VR]]></title>
	<link rel="self" href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=214&amp;type=atom" />
	<updated>2016-07-29T14:04:08Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.infinity-code.com/viewtopic.php?id=214</id>
		<entry>
			<title type="html"><![CDATA[Re: Usage with VR]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=993#p993" />
			<content type="html"><![CDATA[<p>Thank you, it seems like i have missed it.</p>]]></content>
			<author>
				<name><![CDATA[saprophagist]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=176</uri>
			</author>
			<updated>2016-07-29T14:04:08Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=993#p993</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Usage with VR]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=990#p990" />
			<content type="html"><![CDATA[<p>Hello.</p><p>We have added these features. Please update Online Maps.</p><p>Example (actually, this example is included in the package):<br /></p><div class="codebox"><pre><code>using UnityEngine;

namespace InfinityCode.OnlineMapsExamples
{
    [AddComponentMenu(&quot;Infinity Code/Online Maps/Examples (API Usage)/InterceptInputExample&quot;)]
    public class InterceptInputExample : MonoBehaviour
    {
        private Vector2 OnGetInputPosition()
        {
#if !UNITY_EDITOR
            // On the device returns center of screen.
            return Camera.main.ViewportToScreenPoint(new Vector3(0.5F, 0.5F, 0));
 #else
            // In the editor returns the coordinates of the mouse cursor.
            return Input.mousePosition;
#endif
        }

        private int OnGetTouchCount()
        {
            // If pressed Z, then it will work like the left mouse button.
            return Input.GetKey(KeyCode.Z) ? 1 : 0;
        }

        private void Start()
        {
            // Intercepts getting the cursor coordinates.
            OnlineMapsControlBase.instance.OnGetInputPosition += OnGetInputPosition;

            // Intercepts getting the number of touches.
            OnlineMapsControlBase.instance.OnGetTouchCount += OnGetTouchCount;
        }
    }
}</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-07-28T21:51:10Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=990#p990</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Usage with VR]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=973#p973" />
			<content type="html"><![CDATA[<p>I have to use OnlineMaps on GearVR, in a 3D virtual world. Map stands before me on a plane and i have to be able to click on markers, drag map, etc. with a joystick and gaze point. There is no any mouse input, mousebutton(0) at GearVR / Oculus platform.</p>]]></content>
			<author>
				<name><![CDATA[saprophagist]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=176</uri>
			</author>
			<updated>2016-07-27T15:44:18Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=973#p973</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Usage with VR]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=966#p966" />
			<content type="html"><![CDATA[<p>Hello.</p><p>Please specify the reason for each option.<br />Perhaps I&#039;ll give you a way to do this without modifying the code.</p>]]></content>
			<author>
				<name><![CDATA[Alex Vertax]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=2</uri>
			</author>
			<updated>2016-07-27T11:57:14Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=966#p966</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Usage with VR]]></title>
			<link rel="alternate" href="https://forum.infinity-code.com/viewtopic.php?pid=961#p961" />
			<content type="html"><![CDATA[<p>* Could you add an option to change &quot;int touchCount = Input.GetMouseButton(0)&quot; to &quot;Input.GetButton&quot; and/or &quot;Input.GetKey&quot;?<br />* Could you add an option to change &quot;Input.mousePosition&quot; for position to &quot;Camera.main.ViewportToScreenPoint(new Vector3(0.5F, 0.5F, 0))&quot; or something similar?</p>]]></content>
			<author>
				<name><![CDATA[saprophagist]]></name>
				<uri>https://forum.infinity-code.com/profile.php?id=176</uri>
			</author>
			<updated>2016-07-27T08:09:04Z</updated>
			<id>https://forum.infinity-code.com/viewtopic.php?pid=961#p961</id>
		</entry>
</feed>
