Jump to content

Floating meshes


Hagop
 Share

Recommended Posts

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?

Link to comment
Share on other sites

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).

Link to comment
Share on other sites

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)

 

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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)

Link to comment
Share on other sites

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 ^_^ ) 

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...