harrison-lucas / bullet

Automatically exported from code.google.com/p/bullet
Other
0 stars 0 forks source link

setFriction behaves incorrectly on OSX with Xcode 5.1 and Bullet 2.82 #801

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

1. Install Bullet 2.82 from brew (compile the lib with Clang Apple LLVM 5.1) ;
2. Create a rigidBody, give it a mass and a collision shape ;
3. Add a plan to collide with (ground) ;
4. Use setFriction on the rigidBody, with a value different from 0.

What is the expected output? What do you see instead?

The actual piece of code was behaving well with a Bullet built using Clang 
Apple LLVM 5.0 (Xcode 5.0). The object was harder to push, and slowed down when 
sliding.

Now, whenever a value different from 0 is given to setFriction, the object will 
start to slide as if it was on ice, and even if there is no slope. The greater 
the value, the faster the sliding speed. Behaves the same way with a negative 
value, but in the opposite direction (seems to be positive/negative x on my 
test).

What version of the product are you using? On what operating system?

Bullet version 2.82 on OSX Mavericks with Xcode 5.1.

The piece of code (mass is different from 0):

btVector3 fallInertia (0, 0, 0);
shipShape->calculateLocalInertia (mass, fallInertia);

btRigidBody::btRigidBodyConstructionInfo rigidBodyCI(mass, shippos, shipShape, 
fallInertia);
rigidBody_ = new btRigidBody(rigidBodyCI);
rigidBody_->setAngularFactor (0);
rigidBody_->setSleepingThresholds (0.0, 0.0);
rigidBody_->setRestitution (0);
rigidBody_->setFriction (0);
rigidBody_->forceActivationState (DISABLE_DEACTIVATION);

Original issue reported on code.google.com by woldend...@gmail.com on 28 Mar 2014 at 11:32

GoogleCodeExporter commented 9 years ago
Moved to github issue tracker here: 
https://github.com/bulletphysics/bullet3/issues/49

Original comment by erwin.coumans on 30 Mar 2014 at 4:42