Blinking Walls

I pulled up some of my archived knowledge here with a few google searches and put together updated the collision detection so that, when the player hits the walls, the walls change color for a period of time (currently set for half a second) before returning to their original color:

This uses a bit of a more advanced concept (coroutines) that will no doubt be discussed later in the course to make the color blink run independently of what is happening in the rest of the code (which isn’t much right now :laughing: ).

Separately, as the picture helped me spot, it looks like I have two meshes intersecting, which is why we see the artifact in the picture above.

1 Like

Fantastic job!

Privacy & Terms