完成丢手雷
parent
62369c0bf0
commit
942db18774
|
@ -65,7 +65,7 @@ DemoWorld::DemoWorld()
|
|||
|
||||
if (i != 0)
|
||||
{
|
||||
float ks = 300, kd = 500;
|
||||
float ks = 300, kd = 100;
|
||||
physicsManager.addSpring(particles[i - 1], particle, 0.005, ks, kd);
|
||||
}
|
||||
}
|
||||
|
@ -98,12 +98,12 @@ void DemoWorld::logicalTick(float deltaTime)
|
|||
mk2->setEnableGravity(true);
|
||||
}
|
||||
|
||||
if (mk2->getPosition().y < 6.5f && mk2->getSpeed().y<0)
|
||||
if (mk2->getPosition().y < 7.5f && mk2->getSpeed().y<0)
|
||||
{
|
||||
particles[particles.size() / 2]->setSpeed(particles[particles.size() / 2]->getSpeed() + mk2->getSpeed()/2.f);
|
||||
particles[3]->setSpeed(particles[3]->getSpeed() + mk2->getSpeed()/2.f);
|
||||
mk2->setEnableGravity(false);
|
||||
mk2->setSpeed(glm::vec3(0));
|
||||
//mk2->setPosition({ 0,-100,0 });
|
||||
mk2->setPosition({ 0,-100,0 });
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue