Bouncing off walls in narrow corridors

Post Reply
ciphr
Posts: 15
Joined: Mon Mar 28, 2011 9:11 am

Bouncing off walls in narrow corridors

Post by ciphr »

Hello,
I have a difficulty in preventing bounces. The main case is bouncing in narrow corridors when using setAngularVelocity, shape of rigid body is compound, primarily is capsuleZ, and when longest part turns towards corridor's walls, body begins shaking (bouncing again and again).
The minor case is bouncing off rounded cubes when applying impulse (angle between local Z axis and impulse vector is PI/2.4f).
I tried setting m_combinedRestitution=0 in gContactAddedCallback, with CF_CUSTOM_MATERIAL_CALLBACK flag. That did nothing.
I tried also code similar to recoverFromPenetration in InternalTickCallback, but it only sometimes applies to bouncing off the floor (in fact, introduces it, I had no floor bouncing prior to that).
I tried these methods together too. No effect.
Can someone please give me some tips what may be wrong?
ciphr
Posts: 15
Joined: Mon Mar 28, 2011 9:11 am

Re: Bouncing off walls in narrow corridors

Post by ciphr »

Forgot to say, that all (automatic) rotation is disabled with setAngularFactor
Post Reply