List
Detect touch on AR object
Posted Date: 2017-12-08 8:36     Edited Date: 2017-12-08 8:51     Writer: inactive

I want detecting touch on AR object (TextureCube on Android Native sample code) 

Vuforia SDK supports to detect touch on AR object by using RaycastHit

 

void Update () {

 

if (Input.GetMouseButtonDown (0))

{

Ray ray = Camera.main.ScreenPointToRay (Input.mousePosition);

ShootRay(ray);

}

}

 

void ShootRay (Ray ray)

{  

 

RaycastHit rhit;

 

bool objectHit = false;

GameObject gObjectHit = null;

 

 

if (Physics.Raycast (ray, out rhit, 1000.0f)) {

  Debug.Log("Ray Shot and hit!");

  objectHit = true;

  gObjectHit = rhit.collider.gameObject;

}

 

}

 

Here is their source code.

 

I want to get like this.

The reason what I am not using Vuforia and select Maxst SDK is that Vuforia is too bad in tracking and this sdk is good on it.

Would you let me know if Maxst SDK has the feature or if I can detect touch on TextureCube by using current SDK?

 

Regards

Posted Date: 2017-12-08 8:51     Edited Date: 2017-12-08 8:51     Writer: inactive

Please refer to the GitHub page below:

https://github.com/maxstdev/MaxstARSDK_Android_Sample

 

MAXST SDK team