Read the title please, Here is my code:
using UnityEngine;
public class Baff : MonoBehaviour
{
Rigidbody2D rb2;
// Update is called once per frame
void Start()
{
rb2 = GetComponent();
}
private void OnCollisionEnter2D(Collision2D collision)
{
rb2.AddForce(ForceMode2D.Impulse);
}
}
The error im getting is: CS1503 C# Argument 1: cannot convert from to ‘UnityEngine.Vector2’ its on the last line of code ( rb2.AddForce(ForceMode2D.Impulse); ) Thanks in advance and thanks for your time