using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class DoorPush : MonoBehaviour
{
    // Start is called before the first frame update
    [SerializeField] private GameObject otherDoor;
    [SerializeField] private Transform forcePosition;

    void Start()
    {
        
    }

    // Update is called once per frame
    void Update()
    {
        
    }

    public void PushDoor()
    {
        Debug.Log("triggered door push");
        otherDoor.GetComponent<Rigidbody>().isKinematic = false;
        otherDoor.GetComponent<Rigidbody>().AddForceAtPosition(forcePosition.transform.forward * 10, forcePosition.position, ForceMode.Impulse);
    }
}
