Closed weiserhei closed 8 years ago
The first and third issues are caused by the GJK shape margins which aren't added to objects' bounding boxes. This will resolve for you:
Goblin.GjkEpa.margins = 0;
The sphere rolling on the box is because the box's contact resolution with the floor is imperfect, leading to the box rotating slightly which changes how it interacts with the sphere. Ammo has a specific box-box collision routine that prevents this.
Goblin.GjkEpa.margins
seems to do a good job, thanks! Couldnt find this in the docs, are there drawbacks when adding this?
And any plans for the future that goblin will handle box-box collision the same way?
Having non-zero margins
is an optimization which is only really visible when you have a large number of contacts. It's not currently documented, and can use some cleanup in the code to reduce it's impact on stability and visuals (avoid floating boxes).
I do plan on adding a BoxBox algorithm, been digging into the approach lately but am trying to knock out constraint limits & motors first.
Cool, thank you for your work. I consider this issue as answered and close it.
Im trying to replace
ammo.js
in favor ofgoblin.js
physics in my projects. I have set up a test case for comparison and experiencing problems with the rigid bodys in goblin. Im working with code copied from the examples/wiki.1x1x1
http://i.imgur.com/B6IEiG4.png http://weiserhei.github.io/threejs-experiments/goblintest/index.html
Problems:
The same scene simulated with ammo.js, ie. what I want to see: http://weiserhei.github.io/threejs-experiments/goblintest/indexAmmo.html