06-07-2022 04:31 AM
Hello.
I'm trying to use the Interaction SDK. I have a quite simple scene with a Canvas and a Plane (floor). Thanks to the Interaction SDK, I can use my hands to interact with the Canvas. That part is working fine.
But now, I would like to be able to point somewhere on the floor and get the position when I pinch my fingers.
To do so, I put a Ray Interactable component and a Pointable Plane component on my floor. Right now, I can point the floor, I can see the cursor moving on the floor as expected.
My question is : How can I get (in script) the position on the floor of the cursor when I click (by pinching) ? Seems pretty simple but the documentation does not help me.
Thanks
Solved! Go to Solution.
06-08-2022 02:36 AM
Answering my own question if someone ever needs it :
public RayInteractor rayInteractor;
Vector3 cursorPosition = rayInteractor.CollisionInfo.Value.Point;
06-08-2022 02:36 AM
Answering my own question if someone ever needs it :
public RayInteractor rayInteractor;
Vector3 cursorPosition = rayInteractor.CollisionInfo.Value.Point;
01-25-2023 07:27 AM
Thank you so much for telling the solution you found
06-14-2023 06:20 PM
Thanks for helping with this! Able to get the interactor after hovering objects.
How are you able to create custom event functions for those interactions ie hover, pinch, etc.