Hagop Posted January 17, 2016 Share Posted January 17, 2016 Back to the basics again. This question seems to be quite naive but I have noticed that meshes float with the movement of the free camera.In the example below I have created a box and when I move the camera left or right the box does not seem to be stationery (at it's initial position) http://babylonjs-playground.com/#DLL2B#4 The "problem" does NOT occurs only if the box intersects with the ground, or more precisely its height (box.position.y) is either 0, or 20 which is it's center point. What's going on? Quote Link to comment Share on other sites More sharing options...
chg Posted January 18, 2016 Share Posted January 18, 2016 I think you are describing something which can be likened to an optical illusion where a lack of sufficient depth cues in the scene trick you into seeing an object as moving when the view changes (rather than seeing that object as stationery). Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 18, 2016 Share Posted January 18, 2016 or perhaps it is related to camera's inertia (that you can turn off with camera.inertia = 0) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 18, 2016 Share Posted January 18, 2016 other point: No need to call createScene or runRenderloop. This is automatic on the playground Quote Link to comment Share on other sites More sharing options...
Hagop Posted January 18, 2016 Author Share Posted January 18, 2016 chg: if it is an illusion issue, then how come the same doesn't happen when the bottom of the box is at the same level as the ground (box.position.y = 20;) ? Delkatosh; inertia doesn't solve the problem and anyhow inertia is indispensable for my project. This seems to be a problem of 2D rasterization of the scene. How come nobody has came across this "simple" issue? Checkout my 3D project . Products on the shelves start to float when the free camera moves on the X-axis (left-right) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 18, 2016 Share Posted January 18, 2016 i'm sorry but I do not see your issue at all can you do a video capture? Quote Link to comment Share on other sites More sharing options...
Temechon Posted January 18, 2016 Share Posted January 18, 2016 I think it's only an optical illusion, like @chg said it... I had a box more deeply, and I don't have the floating sensation anymore: http://babylonjs-playground.com/#DLL2B#10 Thoughts ? GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Hagop Posted January 18, 2016 Author Share Posted January 18, 2016 Here are the screen captures Temechon based on your sample. The first image is after moving left with the left keyboard arrow. I am using Windows XP SP3 ona 2 MBs internet connection Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted January 18, 2016 Share Posted January 18, 2016 At first I could not reproduce your issue on Ubuntu. The arrow keys did nothing, but played with the number lock / arrows on th number pad. It errors on my system too. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted January 18, 2016 Share Posted January 18, 2016 30 minutes ago, JCPalmer said: At first I could not reproduce your issue on Ubuntu. The arrow keys did nothing, but played with the number lock / arrows on th number pad. It errors on my system too. It shows what you show, but it is just an illusion. I set x position of the boxes to 220. Since the ground is 400 by 400, the edge of the ground should end at 200. The boxes are 40, so 220 - half width = 200. Therefore, they should not overlap, and they do not. Seems easier to see like this. Quote Link to comment Share on other sites More sharing options...
Hagop Posted January 19, 2016 Author Share Posted January 19, 2016 I will keep this is issue as open, since the "illusion" does not occur when the box is at ground level. Quote Link to comment Share on other sites More sharing options...
Temechon Posted January 19, 2016 Share Posted January 19, 2016 It's exactly because it's only an illusion By adding shadows or anything that gives you a sense of depth, it will disapear. Quote Link to comment Share on other sites More sharing options...
chg Posted January 19, 2016 Share Posted January 19, 2016 Here try this @Hagop http://babylonjs-playground.com/#DLL2B#12 - 2nd tiny box is in the same location but at ground level (EDIT: just to be clear the main box and plane are in the same locations and so you should be able to mimic your earlier screenshots; however the tiny box should now give you a reference to help you see it as above the ground at it's fixed point relative to it) Quote Link to comment Share on other sites More sharing options...
jerome Posted January 19, 2016 Share Posted January 19, 2016 this is an illusion I just added some transparency to the big box so the ground is visible through it and a point light on the camera, so you can better see the box faces : http://babylonjs-playground.com/#DLL2B#13 Quote Link to comment Share on other sites More sharing options...
chg Posted January 19, 2016 Share Posted January 19, 2016 20 minutes ago, jerome said: I just added some transparency to the big box so the ground is visible through it... http://babylonjs-playground.com/#DLL2B#13 I'm not sure either add much, but anyway I don't think you applied the transparency correctly (as per http://babylonjs-playground.com/#DLL2B#14 it appears to work better on the material than the mesh ) Quote Link to comment Share on other sites More sharing options...
jerome Posted January 19, 2016 Share Posted January 19, 2016 ooopppss, you are totally right !!! wrong copy from my local editor 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.