Added: Collectibles now rotate, float up before disapeparing after being picked up.
This commit is contained in:
@@ -111,12 +111,14 @@ void Dolphin::onUpdate()
|
||||
|
||||
for (int i = 0; i < OYSTERS_COUNT; i++)
|
||||
{
|
||||
oysters[i].update();
|
||||
Vector3 vecDist = oysters[i].mesh.position - player.mesh.position;
|
||||
float dist = Math::sqrt(vecDist.x + vecDist.y + vecDist.z);
|
||||
if (dist < 2.5F && player.getIsJumping() && oysters[i].isActive())
|
||||
{
|
||||
printf("Pickup %d Dist %d\n", i, dist);
|
||||
oysters[i].setActive(false);
|
||||
//oysters[i].setActive(false);
|
||||
oysters[i].disappear();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user