How can build out physical torus, such as basketry, the ball can pass in the middle or collide with it.
There are some examples with physics. Maybe they’ll give you a clue:
https://threejs.org/examples/?q=physics#webgl_physics_terrain
I’m not sure but it seems that ammo.js
does not provide a torus collision shape. That might be a problem for @duanleon if he is going to work with this physic engine.
We have Physijs
I think I would not use a physic engine at all but develop a more simple approximation like in this example:
https://threejs.org/examples/webvr_daydream.html
The code does not illustrate a collision detection between a torus and a sphere but the idea to work with velocity
in order to simulate movement and collision. Check out the implementation of the render function.
Thank you very much, @Mugen87 and @prisoner849. From your comments, I understand:
- physic engine cannot support torusMesh;
- There are two potential solutions: one is velocity and another one is concave shape decomposition algorithm. I will research these two topics and try to find out solution.
Will be back once I get solution.
Thanks again!
Finally, I use many physical Cylinder to simulate the torus, it works, although not very perfect…
Thanks for your help again!