Hello I’m doing basic stuff for now with xr rig to make vr .
I wonder How I can implement this kind of stuff.
- 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;
}