Hi everyone!
Had an issue with this lesson. I did find the solution, but i still want a deeper dive on the case.
The case:
Did everything like on the video:
- Made the walls surrounding the arena with rigidbodies and the material.
- Created the script for collision check and material color change.
- On play found out that all the walls light up as soon as the game started.
The versions i troubleshooted:
-
Walls drop on or collide with the plane at the start of the game
I checked the rigid body - the gravity was on, the position and rotation frozen.So the walls didn’t drop.
I changed the position of plane and the walls by Y axis, so that they are not collided. The walls continued to light up. -
Walls collide with each other on the start of the game
So that actually was the issue. The walls collided and changed their color.
The way i solved the case was to leave a tiny distance between the walls in the corners of the arena.
So what i would like to know is why did this happen?
In the video i clearly see that Rick has his walls collided, but he does’t have the same issue. The walls light up on collision with the player. So what is the difference? Why do my walls light up at the start of the game due to collision with each other?
I use Unity version 2021.3.10f1.