This script is attached to the wall(3D Cube) with a box collider :
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class LockedRoomTrigger : MonoBehaviour
{
private void OnCollisionEnter(Collision collision)
{
Debug.Log(collision.transform.name);
}
}
But when the player is moving and hit the cube it's not getting to the Debug.Log I used a break point on the Debug.Log line.
A screenshot of the cube wall with the box collider component and the script attached to it. The problem is not with the player since if I'm moving with the player near doors they open so the player does trigger things and also not walking through walls.
This is a screenshot of NAVI. NAVI is a bit in front of the player and moving with the player and part of the player in the game like a friend helper.
NAVI is the one that collide and hit stuff if doors walls not the player since the NAVI is a bit in front of the player.
NAVI have only a box collider :
And this is the Inspector screenshots of the player. I will add two screenshots since it's not getting inside in one screenshot :
The player is a first person view :