For anyone checking this now, I ld propose to use the OVR Input module with its scroller components provided in the oculus framework. I 'm leaving my old answer below.
Old Answer, if you dont want to use OVRInput Module
After some more search I stumbled upon an answer in the unity forums,
I m posting it here for future reference.
Here you just scroll with the assigned axis as setup in the project settings, if you want to scroll with hand movements just calculate the difference between controller position, for oculus touch I could get mine through changing a bit their code from here https://developer.oculus.com/blog/adding-gear-vr-controller-support-to-the-unity-vr-samples/
public class MoveScrollRect : ScrollRect, IMoveHandler, IPointerClickHandler
{
private const float speedMultiplier = 0.01f;
public float xSpeed = 0;
public float ySpeed = 0;
private float hPos, vPos;
void IMoveHandler.OnMove(AxisEventData e)
{
xSpeed += e.moveVector.x * (Mathf.Abs(xSpeed) + 0.1f);
ySpeed += e.moveVector.y * (Mathf.Abs(ySpeed) + 0.1f);
}
void Update()
{
ySpeed = Input.GetAxis("VerticalScroller");
hPos = horizontalNormalizedPosition + xSpeed * speedMultiplier;
vPos = verticalNormalizedPosition + ySpeed * speedMultiplier;
xSpeed = Mathf.Lerp(xSpeed, 0, 0.1f);
ySpeed = Mathf.Lerp(ySpeed, 0, 0.1f);
if (movementType == MovementType.Clamped)
{
hPos = Mathf.Clamp01(hPos);
vPos = Mathf.Clamp01(vPos);
}
normalizedPosition = new Vector2(hPos, vPos);
}
public void OnPointerClick(PointerEventData e)
{
EventSystem.current.SetSelectedGameObject(gameObject);
}
public override void OnBeginDrag(PointerEventData eventData)
{
EventSystem.current.SetSelectedGameObject(gameObject);
base.OnBeginDrag(eventData);
}
}