im trying to add horizontal force to my player. But everytime I try, only Vertical force gets applied. My character shoots straight in the air but not to the left or right. I also tried adding way more force. Maybe im doing something wrong idk.
public class SpaceScript : MonoBehaviour
{
public GameObject Player;
private void OnTriggerEnter2D(Collider2D collision)
{
Rigidbody2D Player1 = Player.GetComponent<Rigidbody2D>();
Player1.AddForce(new Vector2(10, 10), ForceMode2D.Impulse);
}