Question by
seileremerson · Aug 14, 2019 at 12:51 AM ·
script.vuforiaaugmented-realityaugmented reality
Open URL when touch object android
Hello, I am a beginner in this world of augmented reality, unity and vuforia. Actually I understand very little about programming either.
I made an augmented reality app where I point to my business card and a 3D model appears. But I need to make that when I click on the object on my phone screen (Android), open the browser on my site.
I was based on a script that made the object rotate and worked well, the object rotates 360º when interacting with it through the screen, but replacing the code with the site code, it worked on the computer, but nothing happens on the phone.
using UnityEngine;
using System.Collections;
public class SpinLogic : MonoBehaviour
{
float f_lastX = 0.0f;
float f_difX = 0.5f;
float f_steps = 0.0f;
int i_direction = 1;
// Use this for initialization
void Start()
{
}
// Update is called once per frame
void Update()
{
if (Input.GetMouseButtonDown(0))
{
Application.OpenURL("www.google.com");
}
}
}
Comment