Andrey Zimin Posted February 13, 2018 Share Posted February 13, 2018 Hello, friends! Friction isn't it supposed to stop the ball? Why does he keep moving like nothing's working on him? see here - https://www.babylonjs-playground.com/#BEFOO#228 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted February 13, 2018 Share Posted February 13, 2018 Hiya AZ. This question has happened before, and I love answering it. I think it was @fenomas who first told us why this happens. It's cuzzzzz... sphere's have very little surface area colliding with the ground. No friction. It would be the same way in real life, but especially true in an air-free environment such as a BJS scene. BJS is also known for its VERY VERY smooth ground-planes. heh My favorite way seen so far... is .linearDamping. I think RaananW invented that property for us... because his work-boot got wore-out. (more about that, below) https://www.babylonjs-playground.com/#OJVVA#18 (line 32) There's another way... something like... scene.beforeRender=function(){ sphere.physicsImpostor.physicsBody.linearVelocity.scaleEqual(.95) } // applies a .05 drag-factor to the linear velocity. The above method... has also been called "RaananW's Leather Work Boot"... because he first told us about it, and it is similar to pushing your shoe against the sphere... to slow it. I hope this helps. Party on! Andrey Zimin and fenomas 2 Quote Link to comment Share on other sites More sharing options...
Andrey Zimin Posted February 13, 2018 Author Share Posted February 13, 2018 36 minutes ago, Wingnut said: Hiya AZ. This question has happened before, and I love answering it. I think it was @fenomas who first told us why this happens. It's cuzzzzz... sphere's have very little surface area colliding with the ground. No friction. It would be the same way in real life, but especially true in an air-free environment such as a BJS scene. BJS is also known for its VERY VERY smooth ground-planes. heh My favorite way seen so far... is .linearDamping. I think RaananW invented that property for us... because his work-boot got wore-out. (more about that, below) https://www.babylonjs-playground.com/#OJVVA#18 (line 32) There's another way... something like... scene.beforeRender=function(){ sphere.physicsImpostor.physicsBody.linearVelocity.scaleEqual(.95) } // applies a .05 drag-factor to the linear velocity. The above method... has also been called "RaananW's Leather Work Boot"... because he first told us about it, and it is similar to pushing your shoe against the sphere... to slow it. I hope this helps. Party on! Thank You! I'm sure this is not the last time you answered that question. Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Marcuzhet Posted August 23, 2019 Share Posted August 23, 2019 On 2/13/2018 at 3:08 PM, Wingnut said: Hiya AZ. This question has happened before, and I love answering it. I think it was @fenomas who first told us why this happens. It's cuzzzzz... sphere's have very little surface area colliding with the ground. No friction. It would be the same way in real life, but especially true in an air-free environment such as a BJS scene. BJS is also known for its VERY VERY smooth ground-planes. heh My favorite way seen so far... is .linearDamping. I think RaananW invented that property for us... because his work-boot got wore-out. (more about that, below) https://www.babylonjs-playground.com/#OJVVA#18 (line 32) There's another way... something like... scene.beforeRender=function(){ sphere.physicsImpostor.physicsBody.linearVelocity.scaleEqual(.95) } // applies a .05 drag-factor to the linear velocity. The above method... has also been called "RaananW's Leather Work Boot"... because he first told us about it, and it is similar to pushing your shoe against the sphere... to slow it. I hope this helps. Party on! Good solution for a flat ground. But it doesn't work in an little bit inclinated floor. (Maybe a ball can stop while is running down from the hill by the friction with grass) Do you know some other trick to solve it also for inclinated floor? Thanks Quote Link to comment Share on other sites More sharing options...
MarianG Posted September 17, 2019 Share Posted September 17, 2019 On 8/23/2019 at 11:15 AM, Marcuzhet said: Good solution for a flat ground. But it doesn't work in an little bit inclinated floor. (Maybe a ball can stop while is running down from the hill by the friction with grass) Do you know some other trick to solve it also for inclinated floor? Thanks Hi @Marcuzhet, please post your question on the new forum:https://forum.babylonjs.com/ 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.