klem Posted September 8, 2016 Share Posted September 8, 2016 Hi, I'm very new to BabylonJS, but I need to admit it's a great framework, very polished. And the playground is a delicious toy I'm currently playing with the physics plugin (cannon) and I'm trying to understand joints. In fact I've got an issue when I add a joint between 2 meshes : there is a force applied directly on those meshes. The result is an undesired pseudo-random movement at startup. I tried things with setLimit or setMotor on joint, but there is always a kind of big impulse at launch. It looks like a bug, but I'm not really sure Here's the playground : http://www.babylonjs-playground.com/#24JRLD#1 In this playground, 2 cubes are "hinge-joined" but the initial movement is undesired. If you comment the addJoint call (line 112), cubes are placed correctly. Is there a way to avoid this undesired movement? Other point, when you remove the joint, the cube (top) never stop moving ! is it a special property to avoid that ? I missed something? Also I think I found a bug (another?) with the setMass function : joints are removed after setting a new mass on mesh. I prepared a demo with the bug here : http://www.babylonjs-playground.com/#24JRLD (same as before, but when user clicks, a setMass function call breaks the joint). Any help would be greatly appreciated! klem Quote Link to comment Share on other sites More sharing options...
adam Posted September 8, 2016 Share Posted September 8, 2016 http://www.babylonjs-playground.com/#24JRLD#2 http://www.babylonjs-playground.com/#24JRLD#6 1 hour ago, klem said: Other point, when you remove the joint, the cube (top) never stop moving ! is it a special property to avoid that ? I missed something? I'm not sure what's going on there. I tried changing the friction and the sleep properties without success. 1 hour ago, klem said: Also I think I found a bug (another?) with the setMass function : joints are removed after setting a new mass on mesh. If you set the mass directly to the body, it doesn't break: http://www.babylonjs-playground.com/#24JRLD#7 Quote Link to comment Share on other sites More sharing options...
klem Posted September 8, 2016 Author Share Posted September 8, 2016 Hey Adam, nice shot (https://www.diffchecker.com/rtqR93yv), thanks! And the workaround for the setMass is good to know 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.