Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

friction between sphere and plane #2

Open
hero101111 opened this issue Apr 7, 2011 · 2 comments
Open

friction between sphere and plane #2

hero101111 opened this issue Apr 7, 2011 · 2 comments

Comments

@hero101111
Copy link

Hi,

I've made a little scenario consisting of a sphere and a plane (with normal (0, 1, 0) and distance 0, so the xOz plane). The system has a gravity of [0, -9, 0]. The ball is positioned slightly above (in the positive Y direction) the plane with an initial velocity on the X-axis. There is a friction coefficient set for both the ball and the plane. I would expect the ball to 'fall' onto the plane and continue its movement in parallel with the X-axis, but slowly decreasing its velocity because of the friction.
I am unable to obtain this behavior using the friction parameter. No matter what I set for the friction parameters, the system behaves as if there were no friction at all.
I am curious why this happens.

I've pasted the code here: http://pastebin.com/x8sTYRaD

Regards,
Gabriel

@supereggbert
Copy link
Owner

Have you tried increasing the mass of the sphere? did you try setting the friction to 1 for both the plane and the sphere? It may be a bug but I'm not sure the set up would result in a very big slowdown due to friction.

Assuming the units are SI, that would mean the sphere has a mass of 1k but has a diameter of 2m and no linear damping for air resistance. I would expect that to behave like a giant polystyrene ball and keep on going for miles before stopping due to friction(unless the friction was very high).

I do think there is something up with the plane/sphere interaction since if you replace the plane with a box it behaves quite differently. I'll investigate further when I get a chance.

@supereggbert
Copy link
Owner

Just notice you had system.integrate(1); that is much much to high for a good sim, try lowering!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants