Code: Select all
...
btRigidBody::btRigidBodyConstructionInfo fallRigidBodyCI(
this->mass,
this->motionState,
this->shape,
fallInertia);
fallRigidBodyCI.m_friction = 1.0f
this->rigidBody = new btRigidBody(fallRigidBodyCI);
this->rigidBody->setDamping(0.4, 0.4);
this->physicsWorld->addRigidBody(rigidBody);
this->rigidBody->setFriction(this->friction);
std::cout << this->rigidBody << std::endl;
Code: Select all
btWheelInfo &wheel_inf = this->vehicle->getWheelInfo(i);
btCollisionObject *contact_obj = (btCollisionObject*) (wheel_inf.m_raycastInfo.m_groundObject);
if (contact_obj) {
std::cout << "friction "
<< contact_obj->getFriction()
<< std::endl;
}
Runned in debugger, when adding btRigidBody(first code block), print this->rigidBody output differs from (second code block) print contac_obj. And when contacting with another btRigidBody, output of print contac_obj is the same all the time.
How can I proceed to actual rigidBody/collisionObject? It seems that any contact of Ray points to internal Bullet representation of RigidBody, where all of them is the one.