Hi. I have forked @will 's Flappy Bird game, and I am modifying it so it is more like the original game.
var zrot = pc.math.clamp(this.velocity, -2, -0.75); zrot += 1; this.entity.setLocalEulerAngles(0, 0, zrot * 90);
From what I understand, this piece of code makes the bird face upwards (around 22.5 degrees) and fall down looking 90 degrees at the floor.
However, I want to delay this slightly so the bird looks upwards for slightly longer, and then faces downwards. I have tried using the timeout function, but after the period of time I set, the bird freezes and can no longer jump.
Any help with this problem is appreciated, thank you