<?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 — Interactions with Daydream VR controller]]></title>
		<link>https://forum.infinity-code.com/viewtopic.php?id=431</link>
		<atom:link href="https://forum.infinity-code.com/extern.php?action=feed&amp;tid=431&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[The most recent posts in Interactions with Daydream VR controller.]]></description>
		<lastBuildDate>Fri, 24 Feb 2017 13:56:09 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: Interactions with Daydream VR controller]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1886#p1886</link>
			<description><![CDATA[<p>The map only works with the code above, if it is direct in front of the camera and has no rotation. </p><p>Example: If it has rotation around Y the position of the pointer is not correct. And it has +90° X rotation (map lies on ground) I can only drag the map so that the lng values changes, but lat is constant.</p><p>Does anybody has a solution for this problem?</p>]]></description>
			<author><![CDATA[null@example.com (schina)]]></author>
			<pubDate>Fri, 24 Feb 2017 13:56:09 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1886#p1886</guid>
		</item>
		<item>
			<title><![CDATA[Re: Interactions with Daydream VR controller]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1884#p1884</link>
			<description><![CDATA[<p>Thanks, but was does &quot;and use the center of screen as the cursor&quot; mean? I have a controller which has its own cursor. Or do I misunderstand that?</p><p>I had some issues, but the main part is this for interaction with buttons</p><div class="codebox"><pre><code>    protected override void BeforeUpdate()
    {
#if UNITY_EDITOR || UNITY_STANDALONE || UNITY_WEBPLAYER || UNITY_WEBGL || UNITY_ANDROID
       
        if (GvrController.ClickButtonDown) { OnMapBasePress(); }
        else if (GvrController.ClickButtonUp) { OnMapBaseRelease(); }

    }</code></pre></div><p>and for position of controller:</p><div class="codebox"><pre><code>    public Vector2 GetInputPosition()
    {
        if (OnGetInputPosition != null) { Debug.Log(&quot;return OnGetInputPosition&quot;); return OnGetInputPosition(); }
        Vector2 vec2 = Input.mousePosition;
#if UNITY_HAS_GOOGLEVR &amp;&amp; (UNITY_ANDROID || UNITY_EDITOR)
        vec2 = DaydreamInput();
#endif
        return vec2;
    }

    private Vector2 DaydreamInput()
    {
        Transform pointerTransform = pointer.GetPointerTransform();
        float maxPointerDistance = pointer.GetMaxPointerDistance();
        Vector3 pointerPos = pointerTransform.position + (pointerTransform.forward * maxPointerDistance);
        Vector2 vector2 = new Vector2(pointerPos.x, pointerPos.y);
        return vector2;
    }</code></pre></div><p>That works perfectly for a map which is in front of me directly. But if the map is under me (turned 90° over x axis), only the lng value changes. The translation from Vector3 to Vector2 seems to be a problem.</p>]]></description>
			<author><![CDATA[null@example.com (schina)]]></author>
			<pubDate>Thu, 23 Feb 2017 17:20:12 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1884#p1884</guid>
		</item>
		<item>
			<title><![CDATA[Re: Interactions with Daydream VR controller]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1880#p1880</link>
			<description><![CDATA[<p>Hello.</p><p>The most simple way (without modification of Online Maps scripts):<br /><a href="http://infinity-code.com/atlas/online-maps/pages/InterceptInputExample.html">http://infinity-code.com/atlas/online-m … ample.html</a></p>]]></description>
			<author><![CDATA[null@example.com (Alex Vertax)]]></author>
			<pubDate>Thu, 23 Feb 2017 02:08:01 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1880#p1880</guid>
		</item>
		<item>
			<title><![CDATA[Re: Interactions with Daydream VR controller]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1879#p1879</link>
			<description><![CDATA[<p>Okay, I did it. To answer the question on my own: Yes, every interaction has to be &quot;transleted&quot; to inputs from controller.</p>]]></description>
			<author><![CDATA[null@example.com (schina)]]></author>
			<pubDate>Wed, 22 Feb 2017 23:59:31 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1879#p1879</guid>
		</item>
		<item>
			<title><![CDATA[Interactions with Daydream VR controller]]></title>
			<link>https://forum.infinity-code.com/viewtopic.php?pid=1877#p1877</link>
			<description><![CDATA[<p>I want to make it to support Daydream inputs, so custom controller inputs.</p><p>I started with the raycasting and adapted the PointerEventData from Vector2 to Vector3 (controller) in OnlineMapsUIImageControl. Fine. Next step would be the interactions like zooming.</p><p>That way of &quot;translating&quot; the interactions does not feel good. Is there better way to use custom inputs generally?</p>]]></description>
			<author><![CDATA[null@example.com (schina)]]></author>
			<pubDate>Wed, 22 Feb 2017 19:29:48 +0000</pubDate>
			<guid>https://forum.infinity-code.com/viewtopic.php?pid=1877#p1877</guid>
		</item>
	</channel>
</rss>
