Jump to content

Strange conveyor behaviour


Smek
 Share

Recommended Posts

Hello all,

I just started experimenting with the great Babylon framework. I am trying to mimic pallets (1.2 * 1.6 * 0.8 m, 1000 kg) running on a conveyor belt behaviour by setting a linearVelocity to an object without mass which then acts as the conveyor.

See this demo: http://www.babylonjs-playground.com/#11KWUR#7

But i am running into a problem, related to the velocity. I am setting a velocity of 0.25 m/s (line 53) and the "conveyor" is 10 meters long (line 46). This means it should take about 40 seconds to cover that distance. But as you can see from the demo the speed is approximatly 1 m/s since it only takes 10 seconds to cover the distance. The issue is not related to friction, to illustrate I have added an other 'pallet' with low friction.

Can somebody explain the behaviour to me? And how can I fix this?

Thanks in advance!

Link to comment
Share on other sites

Hi @Smek,

you had me at "the great Babylon framework". :)

This is rather werid, yes. I have to say - the timestep solution is the quickest and the safest for you to simulate the right behavior. As babylon only acts as a proxy to the real physics engine (which, in this case, is cannon.js), it will be wise to see what cannon is actually doing with the information. I will try finding a bit of time later today and debug this a bit, see what we are doing wrong.

 

 

Link to comment
Share on other sites

I looked at it some more, for some reason the real velocity is a factor 0.33 compared to the real thing.

I fixed it (for now) by setting the time step to 1/180 instead of 1/60 and the gravity to 3 times -9.81. But I think this is something to look at since users are probably expecting the same units as both physics engines use.

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