Hi, I am trying to set up the boundaries on the map where my character moves, but after I insert these code in, my character still moves out of the boundary. Could you help me with this? Thanks
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
public class Map : MonoBehaviour
{
private BoundsInt boundsInt;
public Vector3Int MinAxis = new Vector3Int (0, 0, 0);
public Vector3Int MaxAxis = new Vector3Int (727, 405, 0);
void Start()
{
boundsInt.SetMinMax(MinAxis, MaxAxis);
}