hi im new to unity and im trying to creat a 2d platformer
im struggling with throwing the player character in an object direction
i have a 2d player with a basic movment script and i want him to be thrown toward a object
every time the left mouse button is clicked
Script:
public class throwPlayer : MonoBehaviour
{
Rigidbody2D rb;
public Transform fireTowerds;
public float force;
void Start()
{
rb=GetComponent<Rigidbody2D>();
}
//called from another script when left mouse button is clicked
public void throw()
{
}