Further tweaked restitution for track and bowling ball to avoid

bowling balls jumping up and down, while still maintaining a push
back for soccer balls.
This commit is contained in:
hiker 2016-08-01 08:00:14 +10:00
parent efe9fa6329
commit cdde62dadb
2 changed files with 2 additions and 2 deletions

View File

@ -57,7 +57,7 @@ Bowling::Bowling(AbstractKart *kart)
createPhysics(y_offset, btVector3(0.0f, 0.0f, m_speed*2),
new btSphereShape(0.5f*m_extend.getY()),
1.0f /*restitution*/,
0.8f /*restitution*/,
-70.0f /*gravity*/,
true /*rotates*/);
// Even if the ball is fired backwards, m_speed must be positive,

View File

@ -188,7 +188,7 @@ void TriangleMesh::createPhysicalBody(btCollisionObject::CollisionFlags flags,
m_motion_state = new btDefaultMotionState(startTransform);
btRigidBody::btRigidBodyConstructionInfo info(0.0f, m_motion_state,
m_collision_shape);
info.m_restitution = 1.0f;
info.m_restitution = 0.8f;
m_body=new btRigidBody(info);
World::getWorld()->getPhysics()->addBody(m_body);