Friction to stop the ball

Recommended Posts

Hello, friends! Friction isn't it supposed to stop the ball? Why does he keep moving like nothing's working on him?

Share on other sites

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)

(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!

Share on other sites
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)

(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.

Share on other sites
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)

(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

Share on other sites
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

https://forum.babylonjs.com/

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.

×   Pasted as rich text.   Paste as plain text instead

Only 75 emoji are allowed.