Rigid body stuck on wall due to friction

ryanjuckett
Posts: 13
Joined: Tue Mar 11, 2008 9:04 am

Rigid body stuck on wall due to friction

Post by ryanjuckett »

I have a simulation running where there is a capsule based character moving around in the XZ plane with gravity pointing along -Z. Every once in a while, when I have the character jump into a wall I am able to get him stuck. Normally when colliding with a vertical wall there looks to be only one contact point. In this broken case, two are displayed (as seen in the attached image). One of these two contact points ends up with an m_appliedImpulse of around 300 too 400 that keeps slowly growing. Unlike the other contact point, this one is not readded each frame and thus the m_appliedImpulse value doesn't seem to be getting reset. Should it be? If I am following things correctly, the very large value of m_appliedImpulse seems to be canceling out gravity through friction.

Is this a legal/expected state for a rigid body to get into? Any thoughts on what I might be doing to cause it? I also upgraded from version 2.56 to 2.67 the other day. I don't recall seeing this issue before then, but I wouldn't rule out the potential of error on my end.
You do not have the required permissions to view the files attached to this post.
User avatar
John McCutchan
Posts: 133
Joined: Wed Jul 27, 2005 1:05 pm
Location: Berkeley, CA

Re: Rigid body stuck on wall due to friction

Post by John McCutchan »

Is your game character's collision shape a convex hull of points? It appears to be based on the rendering. If it is, you might be able work around the problem by, and this is just a guess, using the multisphere shape to get a round and smooth surface that would allow for the character to slide.
ryanjuckett
Posts: 13
Joined: Tue Mar 11, 2008 9:04 am

Re: Rigid body stuck on wall due to friction

Post by ryanjuckett »

John McCutchan:

The character is a capsule shape which I think might end up being a multisphere shape under the hood. The sharp corners in the screenshot are just a result of how bullet renders it's debug wireframe for spherical primitives.

The character works fine 99% of the time. It will only get caught if I jump up into a wall with the right amount force as far as I can tell. If I'm trying to repro it, even that takes about ten attempts.