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

public class PowerUpBoundaryCheck : BoundaryCheck
{
    private Rigidbody _pickUpObjectRigidBody;

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

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