Cannot pick an object?

I simply want to know what object the player is looking at. So, like in the VR-samples I shoot a ray from the camera location to its forward direction. Should be simple, and it works in the samples.

I attached this script to the camera:

// Create a ray that points forwards from the camera.
Ray ray = new Ray(transform.position, transform.forward);
RaycastHit hit;

// Do the raycast forwards to see if we hit an interactive item
if (Physics.Raycast(ray, out hit, raycastLength))
{
lookingAt = hit.collider.gameObject;
}
else
{
lookingAt = null;
}

Works fine in the editor, but once running on the GearVR, no matter how much I look around, the lookingAt object is always what is in in front of the camera in its unrotated state.

Then I tried to output this while debugging:

transform.rotation.ToString()
transform.forward.ToString()

In the editor they values change while looking around, on the GearVR, no change…

What is going on here? Almost identical code is used in the VR samples, and is working fine. Have I overlooked some setting somewhere?

How’s this in any way relevant?

nvm, thought you were using an event system