Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Objects shaking all time #84

Open
romanunit opened this issue Jan 18, 2019 · 8 comments
Open

Objects shaking all time #84

romanunit opened this issue Jan 18, 2019 · 8 comments

Comments

@romanunit
Copy link

Hey.
I am using Oimo.js physics for Babylon.js, and I has arisen a problem. When several objects are near or above each other, these objects start to shake uncontrollably until the objects fly apart from each other.

I attach a link to the video. Someone can help with this problem?
https://youtu.be/fAEQQYNWHlc

In the video, I do not attach any force to the objects. I spawn them down and put some objects on top of others.

I found the function this.orientation.addTime (this.angularVelocity, timeStep);
if this.angularVelocity assigns all coordinates to 0, then the shaking problem is solved, but in this way I block the turns of objects, but for me they are important. Can someone tell me on this issue? I also found that the authors of this code were

With best regards, Roman.

@romanunit
Copy link
Author

romanunit commented Jan 21, 2019

@lo-th, could you please help me?

@lo-th
Copy link
Owner

lo-th commented Jan 21, 2019

i think you should increase size of all object

@romanunit
Copy link
Author

romanunit commented Jan 21, 2019

i think you should increase size of all object

@lo-th, Thanks for reply.
But how it`s change my problem? I think problem is with colliders, bcs when I discard mass from object everything stop shake.

I have coins with different size. Also I can show you example with cubes where i thing we have the same problem.
https://www.babylonjs-playground.com/#DCR6ZG#1

Cubes are shaking. But they should not do that.

@lo-th
Copy link
Owner

lo-th commented Jan 21, 2019

yes cube is to little *10 or *100 and you see difference

@romanunit
Copy link
Author

romanunit commented Jan 21, 2019

@lo-th, I increased the cubes by 10 or 100, but they are still shaking. Is it possible to remove shaking without increasing all objects?
https://youtu.be/rLiVFJr5dUc

Thanks!

@lo-th
Copy link
Owner

lo-th commented Jan 21, 2019

mm you can try to up world iteration
world.numIterations = 30; // default is 8

or maybe change physics engine Energy have verry good stacking
https://lo-th.github.io/Energy.lab/#building

oimo don't have linear or rotation limiter

@jacycode
Copy link

fix the problem?The coefficient of restitution of the shape in config maybe help you.

@stefanuddenberg
Copy link

Bump; curious if you ever solved this issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants