Hello, I am trying to just have a simple script that makes a wall move with a hole that the player has to get through, if the player hits the wall it resets the scene. Instead of resetting the scene or just hitting the player with the collider the player just passes entirely through the wall. I’m not entirely sure why it does this. The player and the wall both have colliders.
Here is my script (It’s very simple and im not sure if thats the problem)
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class WallMoveForward : MonoBehaviour {
public float speed = 1f;
void Update () {
transform.Translate(0, 0, speed * -Time.deltaTime);
}
}