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

public class PlayerBoundaryCheck : BoundaryCheck
{
    private Rigidbody _objectRigidBody;

    // Start is called before the first frame update
    void Awake()
    {
        _objectRigidBody = gameObject.GetComponent<Rigidbody>();
    }

    public override void DoBoundaryPushback(Vector3 contactPoint, float pushbackForce)
    {
        _objectRigidBody.velocity = Vector3.zero;
        _objectRigidBody.AddForceAtPosition(contactPoint * pushbackForce, contactPoint, ForceMode.Impulse);        
    }
}
