xr raycast. how can I know position of ray casted with left/right controller.

Hello I’m doing basic stuff for now with xr rig to make vr .
I wonder How I can implement this kind of stuff.

  1. there is a plane of 10x10 meter
    and I point that plane with left controller from left to right of plane game object.
    and print log where I point it.
    it should be like 0,0,0 → 1,0,0 → 2,0,0 as I move to right…

how can I do this?
I used xr grab interactable script and with hover event I can detect where I point it with raycast but can’t find exact transform for each frame.

for example.
I did this before vr.
if(Physics.Raycast(Camera.main.ScreenPointToRay(Input.mousePosition),out hit,25.0f,LayerMask.GetMask(“mygame”))){
x=(int)hit.point.x;
y=(int)hit.point.z;
}else{
x=-1;
y=-1;
}

There will probably be some transform associated with the actual controller… at least there was with OculusGo, if I recall correctly (it’s been a few years).

You could check over in the VR / AR / XR forum on this same board. They might even know the API you’re looking for.