Pryme8 Posted August 7, 2018 Share Posted August 7, 2018 So here is a good technical hurdle. https://www.babylonjs-playground.com/#7AHEVA#18 Trying to figure out the best way to do a interlinked chain and be able to do a physics simulation with it, the hurdle here is there will be 27 chain systems on the basket which makes things hard. I am thinking the solution will be to use use physic linked cylinders and hide then from visibility then children the link impostors to the hidden cylinders. This solution does not give the "slide" effect that happens between chain links though and so I am open to more ideas. After being able to construct the chain the next part will be connecting it to two anchor points and having the chain hang correctly. Another hard part will be the fact the end anchor point for all the chain systems is a ring that they are all connected to so when one chain system gets hit at min 12 systems will have to calculate. Quote Link to comment Share on other sites More sharing options...
Guest Posted August 7, 2018 Share Posted August 7, 2018 Well I would say that chain can be simulated with joints: http://doc.babylonjs.com/how_to/using_the_physics_engine#physics-joints But perhaps I misunderstood the question? Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 7, 2018 Author Share Posted August 7, 2018 Have you ever played disc golf before? This one might be a little hard to visualize unless you have seen a disc slam chains before. I would need like sliders with ball and socket combined. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 7, 2018 Author Share Posted August 7, 2018 https://www.babylonjs-playground.com/#NP3GK1#2 I am struggling with this. I effectively want the links to be connected with a slider joint in the middle that allows for sliding on the y Axes only so that way the links and expand/compress. It should effectively look like this: https://www.babylonjs-playground.com/#NP3GK1#5 after they settle. *UPDATE* I was not using Oimo, which has the slider joint... but I am still stuggling 1 second will post update. https://www.babylonjs-playground.com/#NP3GK1#7 with one link it "works" with two or more they disappear... for some reason I can never get the joints working correctly. *UPDATE* https://www.babylonjs-playground.com/#NP3GK1#8 Ok got the chain "Working" now I need to figure out to how to constrain the rotations and then how to connect multiple systems together. https://www.babylonjs-playground.com/#NP3GK1#11 I also need to figure out how to make the connected effect less violent as the numbers increase. https://www.babylonjs-playground.com/#NP3GK1#12 https://www.babylonjs-playground.com/#NP3GK1#13 Nabroski 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 7, 2018 Author Share Posted August 7, 2018 Ha, look at this thing just load itself up... thats not right... https://www.babylonjs-playground.com/#NP3GK1#15 https://www.babylonjs-playground.com/#NP3GK1#19 gotta figure out how to make it stop bouncing under its own weight. *UPDATE* https://www.babylonjs-playground.com/#NP3GK1#20 well I guess this kinda works, taking a mass of 1 dividing it by the number of links in the chain. Then as it goes down remove the fraction of the mass away from the total as it goes down. Only works up to an extent though. Quote Link to comment Share on other sites More sharing options...
Nabroski Posted August 7, 2018 Share Posted August 7, 2018 http://schteppe.github.io/cannon.js/examples/threejs_fps.html http://schteppe.github.io/cannon.js/ Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 7, 2018 Author Share Posted August 7, 2018 Those are fixed points, I need them to slide. Quote Link to comment Share on other sites More sharing options...
Nabroski Posted August 7, 2018 Share Posted August 7, 2018 their is a chain ? did you try it. http://schteppe.github.io/cannon.js/examples/threejs_fps.html what do you mean with slide ? Quote Link to comment Share on other sites More sharing options...
Nabroski Posted August 7, 2018 Share Posted August 7, 2018 chain amin: https://www.youtube.com/watch?v=6y9ID8Ml8jY did you try softbody ? https://blog.raananweber.com/2016/04/03/cloth-physics-simulation-for-babylon-js/ http://www.babylonjs-playground.com/#1J3WEP#3 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 7, 2018 Author Share Posted August 7, 2018 I was kinda thinking a softbody tube might make the cut. Now you got me wanting to investigate that. the problem would be connecting the soft bodies to the rings on the pole though, let me see if I can find an example video. https://www.videoblocks.com/video/disc-golf-putt-throw-hits-the-basket-x0wecli this video is kinda weak too, the chains can really get rocked sometimes with a good throw. with the chain tutorial in blender does not take into account the sliding that the chains do, they do not stay fixed to each other in a single pivot point and that's what gives them their play. Looks like my mass hack will work for now: https://www.babylonjs-playground.com/#NP3GK1#21 Cause all I need is 26 chains per system. Plus it kinda makes sense the mass would go like that (not really but ok), the top link has the cumulative weight of all below it. Quote Link to comment Share on other sites More sharing options...
Nabroski Posted August 7, 2018 Share Posted August 7, 2018 ok. i understand. so you prev. example looks a bit like this. https://www.babylonjs-playground.com/#9ZP81N maybe your join point arent right Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted August 7, 2018 Author Share Posted August 7, 2018 https://www.babylonjs-playground.com/#NP3GK1#23 I think I'm getting closer. Now I gotta figure out how to stop them from rotating past a certain point on their local Y axis. Nabroski 1 Quote Link to comment Share on other sites More sharing options...
Guest Posted August 7, 2018 Share Posted August 7, 2018 Not that bad !! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.