Making the wall return to the original color after collision

You can make the walls return to the original color after collision by getting the color in the Start method and setting it in the OnCollisionExit method.

5 Likes

That’s really great! Thanks for sharing this.

I changed it a bit, so I created prefab Wall, and attached the script to it with ability to change hit material by just dropping it.

Privacy & Terms