Hello I’m trying to learn C# and at the moment I am trying to make a script that will print to the console if my player walks into a cube, I am going to attach this script to the cube. Here is my script at the moment,
You’ve combined two different collision-related functions. There’s OnCollisionEnter(Collision collision) and OnTriggerEnter(Collider collider), but you’re trying to receive a Collision in the latter of the two. Also, you need to ensure that the collider on your cube has the “Is Trigger” box checked if you want to use OnTriggerEnter.