This is some script from the game I’m making
When the player walks into the object it unlocks the new spell but when I walk the player into it nothing happens. I’m not sure whats wrong because both objects have rigidbodys and colliders with the trigger box ticked.
using UnityEngine;
using System.Collections;
public class Magicmanager : MonoBehaviour
{
void OnTriggerEnter (Collider other)
{
if(other.gameObject.name == "Book1")
{
magic1unlock = true;
}
}
}