Hi, im in the 19th Class of the 3D course and im trying to use OnColissionEnter according to the instructions, but even having carried out each of the indications, my character keeps breaking through the walls. I checked the following thinks:
-Every wall has its Mesh Renderer and Box Collider activated
-Every wall has the script “ObjectHit” added in its components
-My character has its Mesh renderer and Box Collider activated
The script ObjectHit has the next content:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ObjectHit : MonoBehaviour
{
private void OnCollisionEnter(Collision other)
{
Debug.Log("You re bumping a wall!");
}
}
could there be something i’m forgetting?
Thanks!