Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: Thu Apr 12, 2012 2:04 pm 
Offline

Joined: Fri Apr 18, 2008 2:20 pm
Posts: 154
Hi,

by trying to understand what unit and order of magnitude the value passed setBrake() should be, I noticed something interesting in btRaycastVehicle::updateFriction().

Basically, the rolling friction is either computed using the engine force (if not null), otherwise it is computed using the value set using setBrake().

In the first case, the engine force is a force (!), hence multiplied by the time step. In the second case, the value set using setBrake() is considered as an impulse.

Is there a reason not using force for both ?

cheers,
Gregory


Top
 Profile  
 
PostPosted: Tue Aug 07, 2012 12:45 pm 
Offline

Joined: Fri Apr 18, 2008 2:20 pm
Posts: 154
Hmm, it seems this question is still causing me problems.

Hasn't anybody any clue ?

According to my tests, in order to get the same braking independently from the framerate, one has to use the following:

Code:
pVehicle->setBrake(fBrakingForce * fixedTimeStep, wheelID);


with "fixedTimeStep" being the same value used as 3rd parameter when calling:
Code:
btDiscreteDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps=1, btScalar fixedTimeStep=btScalar(1.)/btScalar(60.));


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group