Changing Character Controller
When we interact with the padlock we disable character movement and camera rotation. In the DisableManager script we reference the player controller so we can disable the FirstPersonController script.
public class PLDisableManager : MonoBehaviour
{
[SerializeField] private FirstPersonController player = null; //EDIT THIS
public void DisablePlayer(bool disable)
{
if (disable)
{
player.enabled = false; //EDIT THIS
//OTHER LOGIC
}
else
{
player.enabled = true; //EDIT THIS
//OTHER LOGIC
}
}
}
Last updated
Was this helpful?