Odd behavior for dynamic objects - sliding ignoring friction

Post Reply
ahanganu
Posts: 1
Joined: Thu Jan 29, 2015 3:02 pm

Odd behavior for dynamic objects - sliding ignoring friction

Post by ahanganu »

Hello everyone,

I am using bullet in a first person iOS game and I am using a capsule shaped body with angular factors to 0 to simulate the player. Controls are forcing various velocity values on frame and everything is nice and dandy most of the times. On some occasions (1 out of 10) when I start the game the character is sliding really bad, like he would have 0 friction and very low damping on any other surface. I've tried setting the friction property every frame but in that specific case it's not having any impact. It just feels like there is a huge inertia attached to the body. The world is simulated with a fixed step at 1/23 fps but considering it's working just fine most of the time I suppose it's something a bit deeper which triggers this behavior. The object's mass is 850 units, I am trying to see if it has any impact on this issue right now but I would expect it to reproduce all the time if it was from the mass.

Any tips will be greatly appreciated.

Thanks.
c6burns
Posts: 149
Joined: Fri May 24, 2013 6:08 am

Re: Odd behavior for dynamic objects - sliding ignoring fric

Post by c6burns »

ahanganu wrote:Controls are forcing various velocity values on frame
So you mean, you are calling setLinearVelocity on a dynamic rigid body instead of applyCentralForce / applyCentralImpulse?
ENGine
Posts: 15
Joined: Thu Feb 26, 2015 7:04 am

Re: Odd behavior for dynamic objects - sliding ignoring fric

Post by ENGine »

Hi,

Have you managed to solve this problem? The thing is that I'm working on the same task: trying to make the hockey player.
If I'm using the applyCentralForce, it looks terrible. It seems to me that I can't set up correct parameters for Friction, etc.

Maybe you can help me :) Thanks.
benelot
Posts: 350
Joined: Sat Jul 04, 2015 10:33 am
Location: Bern, Switzerland
Contact:

Re: Odd behavior for dynamic objects - sliding ignoring fric

Post by benelot »

1/23 fps sounds weird, your physics simulation timestep should be independent from your graphics rendering timdstep. 1/23 sounds a bit low for accurate simulation of nearly everything. Check the "fix your timestep" article in the wiki. Also your capsule is 850 kg (depending on the definition of the rest of your system) while probably being not that big, so it has a lot of inertia. Furthermore, your friction should be somewhere between 0 and 10, for both your capsule and the ground it is sliding on. Is all of this the case?
Post Reply