Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
For collision detection there is MonoBehaviour.OnCollisionEnter and MonoBehaviour.OnCollisionStay . You hang a script with one of these methods on the floor and check if it was a ball or something else based on the incoming data. You can check for a layer, a tag, or the presence of a script.
And the color of the floor can be changed in a bunch of ways: turn on another renderer, replace the material, change the properties of the material, stuff it into the MaterialPropertyBlock renderer , turn on the animation ... etc. It's up to you.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question