I can do this in a normal unity scene using the following:
RaycastHit hit;
var cameraCenter = camera.ScreenToWorldPoint(new Vector3(Screen.width / 2f, Screen.height / 2f, camera.nearClipPlane));
if (Physics.Raycast(cameraCenter, this.transform.forward, out hit ,1000))
{
print("I'm looking at " + hit.transform.name);
}
But this is not seem to read objects in my vuforia scene. I have 2 object both with a box collider.
It like it not looking at what I think I’m looking at.
Any ideas?