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:
parent
efe9fa6329
commit
cdde62dadb
@ -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,
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user