が使用されている:ボールの物理的特性はどのように設定する必要がありますか?ボールの物理的性質以下
ゴルフボール
// Create circle shape b2CircleShape circle; circle.m_radius = 15.5/PTM_RATIO; // Create ball shape definition and add to body b2FixtureDef ballShapeDef; ballShapeDef.shape = &circle; ballShapeDef.density = 5000.0f; ballShapeDef.friction = 10.0f; ballShapeDef.restitution = 0.2f; ballFixture = ballBody->CreateFixture(&ballShapeDef);
cricketball
// Create circle shape b2CircleShape circle; circle.m_radius = 17.0/PTM_RATIO; // Create ball shape definition and add to body b2FixtureDef ballShapeDef; ballShapeDef.shape = &circle; ballShapeDef.density = 5000.0f; ballShapeDef.friction = 10.0f; ballShapeDef.restitution = 0.4f; ballFixture = ballBody->CreateFixture(&ballShapeDef);
ironball
// Create circle shape b2CircleShape circle; circle.m_radius = 23.0/PTM_RATIO; // Create ball shape definition and add to body b2FixtureDef ballShapeDef; ballShapeDef.shape = &circle; ballShapeDef.density = 5000.0f; ballShapeDef.friction = 10.0f; ballShapeDef.restitution = 0.0f; ballFixture = ballBody->CreateFixture(&ballShapeDef);
個の
サッカーボール:
// Create circle shape b2CircleShape circle; circle.m_radius = 24.0/PTM_RATIO; // Create ball shape definition and add to body b2FixtureDef ballShapeDef; ballShapeDef.shape = &circle; ballShapeDef.density = 5000.0f; ballShapeDef.friction = 10.0f; ballShapeDef.restitution = 0.8f; ballFixture = ballBody->CreateFixture(&ballShapeDef);
バスケットボール:いまいましい、
// Create circle shape b2CircleShape circle; circle.m_radius = 24.0/PTM_RATIO; // Create ball shape definition and add to body b2FixtureDef ballShapeDef; ballShapeDef.shape = &circle; ballShapeDef.density = 5000.0f; ballShapeDef.friction = 10.0f; ballShapeDef.restitution = 0.6f; ballFixture = ballBody->CreateFixture(&ballShapeDef);
は、すべて私は推測に基づいて実施している初心者なので、私はstucked障害物のようないくつかの問題を抱えていますスローモーションでのスローモーション、そしてその他多くのものがありますので、もっと良い解決策があればそれらを入れてください。