At 5:06 you drop the cube, causing the bottom one to turn red. I copied your video EXACTLY, but my cube doesn't turn red. ...

At 5:06 you drop the cube, causing the bottom one to turn red. I copied your video EXACTLY, but my cube doesn't turn red. It just stays white. How do I fix this? I was thinking it might be because I am using unity 5.6, and I believe you are using an older version in the video. I am running unity on windows 10 64-bit.
  • King Oz(king_of_oz) replied
    Ok. I used a debug.log to see if "onCollisionEnter" is actually being called and it's not. How to I call it in the "Update" Method to it executes once per frame?
  • Jonathan Gonzalez(jgonzalez) replied
    I commend you for using debug.Log, not a lot of people tend to do that and it almost always gives you an idea of what the issue is. Now for OnCollisionEnter, that is a specific method so if it's misspelled and/or not capitalized properly it will just treat it as a custom method. You can try it without the if statement as such: void OnCollisionEnter (Collision col) { colorChange.material.color = Color.red; Debug.Log("Collision Detected"); } That should work, if it doesn't then it may be something within your scene itself that is blocking the collision from happening. The if statement with the tag just allows you to narrow things down to a specific object with that tag.
  • King Oz(king_of_oz) replied
    It turned out I misspelled OnCollisionEnter. Thank you for you help! And thanks for the commendments! Your tutorials are by far the best I ever seen.