@yaustar I have 2 questions regarding this:
1- I’d need to use this raycast scheme for UI elements on the screen as well(because it’s webxr)? Would it work? All I need to do is place a raycast script on UI buttons too?
2- Is it possible to detect finger movement with this raycast scheme? I tried to use this project as an example. It uses touch events like touch move, etc. But with raycast I don’t have that right? How could I go on to achieve this functionality? The idea is that I want to use the colliders as hotspots for the finger movement detection. I don’t want to use them just to select the object, but also to rotate/scale them. Thanks!
EDIT
I found this this.app.xr.input.on('select', this.doRayCast, this);
that seems to cast a raycast if I tap on the screen, like a pointer enter. I guess I need something like this.app.xr.input.on('selectMove', this.doRayCast, this);
, like a pointermove. Is there something like that? If not, what can I do instead?..
EDIT
it seems that it’s just not possible to do what I want regarding number 2? I read these 2 documents: Inputs and input sources - Web APIs | MDN and Inputs and input sources - Web APIs | MDN that seem to suggest that webxr only detects selection and something like a finger drag is not covered by the api?
EDIT
I also tried following this forum post (I used your last post’s project as reference) about scaling and rotating in an AR environment, but it doesn’t work ;_:. I’m not getting errors or anything though. I’m guessing it’s because the traditional input system doesn’t work in a webxr context? What do I do then? At this point I’m just trying to rotate the model without it having to be selected and without the fingers having to be touching the bounding area.
Just trying to make it rotate with touch input on the screen, but even that fails. I’m at a loss T_T.
EDIT
I also found more information here, so it seems that it’s currently not possible at all? I literally can’t detect touch input and consequently can’t do basic ar stuff with a placed model like rotating it and scaling it because the webxr api currently doesn’t allow it?
EDIT
I also found this post, but the guy is not using webxr, so I don’t think it’s relevant…
EDIT
I found this video on youtube, the guy is making the model rotate in webxr mode with touch controls, but using threejs. I am thoroughly confused now. So it is possible after all? How do I get this to work in PlayCanvas?
Thanks a lot for helping me out!