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

public class CoreBoundryCheck : BoundaryCheck
{
    private Rigidbody _coreObjectRigidBody;

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

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