TheTrope Posted September 21, 2016 Share Posted September 21, 2016 Hi ! My scene is working well with FreeCamera, but when i switch to VRDeviceOrientationFreeCamera, some issues appear: FreeCamera: (point over babylonjs logo, the canvas2D sprite size will grow) http://www.babylonjs-playground.com/#XQY4I#13 VRDeviceFreeOrientationCamera (on mobile, no need to use cardboard to see what is failing): (pickInfo totaly fail -see console- + glitchy look of canvas2D when moving || See lines 93-111) http://www.babylonjs-playground.com/#XQY4I#14 In addition, I tried things to bypass pickInfo, but my own implementation of rayPicking does not work, i don't understand why (Lines 86-91) Do you see a mistake in my scene? Thank you ! Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 21, 2016 Share Posted September 21, 2016 Ping @Nockawa Quote Link to comment Share on other sites More sharing options...
Nockawa Posted September 21, 2016 Share Posted September 21, 2016 @TheTrope I take a look in few hours, thanks for reporting Quote Link to comment Share on other sites More sharing options...
TheTrope Posted September 21, 2016 Author Share Posted September 21, 2016 Thanks! It seems the pickInfo/ray issue is not related to camera, but related to mobile use. (When i try #13 on mobile, pickInfos are wrong). For the glitchy canvas2D i think it's related to camera Edit: Even the sprite size on #13 are not the same on mobile and desktop O.o Quote Link to comment Share on other sites More sharing options...
TheTrope Posted September 23, 2016 Author Share Posted September 23, 2016 Sorry for the up, i'm still stuck on this. I do not know if it's a mistake of mine or a bug (for both glitchy canvas2D and pickinfo fail) :/ Does someone have an idea for this? Thanks Quote Link to comment Share on other sites More sharing options...
Nockawa Posted September 23, 2016 Share Posted September 23, 2016 Hello, sorry bug the bugs are pilling up these past days, mainly because I don't have much time. I'm trying to solve another one right now and I'll take a look at yours after, I'll let you know as soon as I can. Quote Link to comment Share on other sites More sharing options...
Nockawa Posted September 23, 2016 Share Posted September 23, 2016 I take a look tonight Quote Link to comment Share on other sites More sharing options...
Nockawa Posted September 23, 2016 Share Posted September 23, 2016 On 9/21/2016 at 5:14 PM, TheTrope said: Hi ! My scene is working well with FreeCamera, but when i switch to VRDeviceOrientationFreeCamera, some issues appear: FreeCamera: (point over babylonjs logo, the canvas2D sprite size will grow) http://www.babylonjs-playground.com/#XQY4I#13 VRDeviceFreeOrientationCamera (on mobile, no need to use cardboard to see what is failing): (pickInfo totaly fail -see console- + glitchy look of canvas2D when moving || See lines 93-111) http://www.babylonjs-playground.com/#XQY4I#14 In addition, I tried things to bypass pickInfo, but my own implementation of rayPicking does not work, i don't understand why (Lines 86-91) Do you see a mistake in my scene? Thank you ! Can you confirm that your 2nd PG (the one with VRCamera) is working as expected from a PC ? Because I do. Now I've checked on a tablet and it's failing, my guess is the VRCamera on a PC is fallbacked to a "standard camera or whatever" because there's no accelerometer. Concerning your own implem of rayPicking, well, this kind of routine is really hard to get working, I'm not saying your don't, but I'm saying: I can't tell if it's working or not. Edit: on the tablet I don't have a picking failure, well, I can pick the ground1, wall but when it's on mini1 there's nothing picked but there's no error or whatsoever. Is that what you have. Also, I don't have a glitchy look of Canvas2D when moving at all, it's looking totally ok on both PC and Tablet. Quote Link to comment Share on other sites More sharing options...
TheTrope Posted September 24, 2016 Author Share Posted September 24, 2016 6 hours ago, Nockawa said: Can you confirm that your 2nd PG (the one with VRCamera) is working as expected from a PC ? Because I do. Now I've checked on a tablet and it's failing, my guess is the VRCamera on a PC is fallbacked to a "standard camera or whatever" because there's no accelerometer. Concerning your own implem of rayPicking, well, this kind of routine is really hard to get working, I'm not saying your don't, but I'm saying: I can't tell if it's working or not. Edit: on the tablet I don't have a picking failure, well, I can pick the ground1, wall but when it's on mini1 there's nothing picked but there's no error or whatsoever. Is that what you have. Also, I don't have a glitchy look of Canvas2D when moving at all, it's looking totally ok on both PC and Tablet. Thanks for your answer ! the 2nd PG is working as expected on a PC. When i try with my phone, i got picking results with an angle difference. If i target the mini1, i got the ground, and if i target a special position in the "sky", i can hit mini1. It feels like the angle of viewport is different than the one used to compute pickInfos. For the glitchy look of Canvas2D, i got this when moving my phone. I can't take a screenshot because the result is "shaking/shuddering". I see a kind of double canvas, but it's because it's shaking. (If you keep moving your phone, you should see it on the second PG (#13), u will see a double red point ) I just tried on tablet, and yes, there is still a little shaking effect. On smartphone it's more visible Quote Link to comment Share on other sites More sharing options...
Nockawa Posted September 24, 2016 Share Posted September 24, 2016 Well, I'm not in my comfort zone here, because a WorldSpaceCanvas is just a plane mesh displaying a Texture, I don't know why the picking is not working, I mean it's not different from any other mesh... I have to check if the scale on the mesh is 1 or different... About the glitchy look, I could see it more clearly on my phone too, I think there's a lag due to the rendering architecture of the VR Mode, I have to talk with other bjs core members to understand how it works and what's going on. May I ask if this is urgent for you or not? I've several things ongoing right now so I have to set priority accordingly. Thanks! Quote Link to comment Share on other sites More sharing options...
TheTrope Posted September 24, 2016 Author Share Posted September 24, 2016 The picking do not work with others mesh of the scene too on Mobile, the is a huge gap between the mesh that it should pick and the ones it pick. This project is my main subject of my internship, so i have a few weeks to get it work :/ But this is is certainly an issue for everybody who wan't to use Canvas2D as an UI for VR :/ Thanks ! ian 1 Quote Link to comment Share on other sites More sharing options...
Nockawa Posted September 25, 2016 Share Posted September 25, 2016 15 hours ago, TheTrope said: The picking do not work with others mesh of the scene too on Mobile, the is a huge gap between the mesh that it should pick and the ones it pick. This project is my main subject of my internship, so i have a few weeks to get it work :/ But this is is certainly an issue for everybody who wan't to use Canvas2D as an UI for VR :/ Thanks ! Ok, let me be clear on one point: the picking issue is not related to VR camera, but it's related to mobile, right Because I've tried this PG: http://www.babylonjs-playground.com/#XQY4I#13 and it works on PC but not on mobile. So talking about VR is maybe a second issue, but first we have to solve this one, right? Quote Link to comment Share on other sites More sharing options...
TheTrope Posted September 26, 2016 Author Share Posted September 26, 2016 23 hours ago, Nockawa said: Ok, let me be clear on one point: the picking issue is not related to VR camera, but it's related to mobile, right Because I've tried this PG: http://www.babylonjs-playground.com/#XQY4I#13 and it works on PC but not on mobile. So talking about VR is maybe a second issue, but first we have to solve this one, right? Well, as you suggested before, maybe the VR camera on PC is fallbacked to a standart camera. In this case, it could be related to the camera. In addition, i did the pickInfo based on width and height of the screen (to get a camera target ray) so in this case, it could be a pickInfo bug And yes, this issue is my priority :/ Thanks ! Quote Link to comment Share on other sites More sharing options...
Nockawa Posted September 26, 2016 Share Posted September 26, 2016 6 minutes ago, TheTrope said: Well, as you suggested before, maybe the VR camera on PC is fallbacked to a standart camera. In this case, it could be related to the camera. In addition, i did the pickInfo based on width and height of the screen (to get a camera target ray) so in this case, it could be a pickInfo bug And yes, this issue is my priority :/ Thanks ! the bug also happens with a FreeCamera on mobile for me! it doesn't pick the "mini1" mesh! @Deltakosh can you take a look? thanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 26, 2016 Share Posted September 26, 2016 What is the question / bug? Quote Link to comment Share on other sites More sharing options...
Nockawa Posted September 26, 2016 Share Posted September 26, 2016 @Deltakosh This PG: http://www.babylonjs-playground.com/#XQY4I#13 is working fine on PC, the expected behavior is when the spinning rect is targetting the babylon.js logo then it zoom (the spinning rect). basically the code does a scene picking at the center of the screen and if the "mini1" mesh is returned then it spins. This works on PC, but it doesn't work on mobile/tablet, for some reason the picking doesn't return the expected mesh. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 26, 2016 Share Posted September 26, 2016 Does it work if Canvas2D is not involved? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 26, 2016 Share Posted September 26, 2016 can you try with this one? http://www.babylonjs-playground.com/#XQY4I#17 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 26, 2016 Share Posted September 26, 2016 Better for visual feedback: http://www.babylonjs-playground.com/#XQY4I#18 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 26, 2016 Share Posted September 26, 2016 Ok found it: this is because of DPI: http://www.babylonjs-playground.com/#XQY4I#20 On mobile the clientWidth !== width Quote Link to comment Share on other sites More sharing options...
TheTrope Posted September 26, 2016 Author Share Posted September 26, 2016 It does not work for me on mobile, the plane should change it's size right? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 26, 2016 Share Posted September 26, 2016 It's working on my 950Xl and on my iphone (the plane should change it's size if in the middle of the screen) Quote Link to comment Share on other sites More sharing options...
TheTrope Posted September 26, 2016 Author Share Posted September 26, 2016 8 minutes ago, Deltakosh said: Ok found it: this is because of DPI: http://www.babylonjs-playground.com/#XQY4I#20 On mobile the clientWidth !== width Thanks ! Do you have an idea for the glitchy look of the camera (lag) when moving on mobile devices? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 26, 2016 Share Posted September 26, 2016 I see no lag on my devices Quote Link to comment Share on other sites More sharing options...
TheTrope Posted September 26, 2016 Author Share Posted September 26, 2016 8 minutes ago, Deltakosh said: I see no lag on my devices Only when using mobile and VRCamera here : http://www.babylonjs-playground.com/#XQY4I#14 The "cursor" should glitch Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.