Topic: Usage with VR

* Could you add an option to change "int touchCount = Input.GetMouseButton(0)" to "Input.GetButton" and/or "Input.GetKey"?
* Could you add an option to change "Input.mousePosition" for position to "Camera.main.ViewportToScreenPoint(new Vector3(0.5F, 0.5F, 0))" or something similar?

Re: Usage with VR

Hello.

Please specify the reason for each option.
Perhaps I'll give you a way to do this without modifying the code.

Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Usage with VR

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.

Re: Usage with VR

Hello.

We have added these features. Please update Online Maps.

Example (actually, this example is included in the package):

using UnityEngine;

namespace InfinityCode.OnlineMapsExamples
{
    [AddComponentMenu("Infinity Code/Online Maps/Examples (API Usage)/InterceptInputExample")]
    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;
        }
    }
}
Kind Regards,
Infinity Code Team.

Boost your productivity a lot and immediately using Ultimate Editor Enhancer. Trial and non-commerce versions available.

Re: Usage with VR

Thank you, it seems like i have missed it.