Hello, I have a problem with the firing system, as the bullet stays still, or moves wrongly. I’m using a rigidbody2D on the bullet, but the force doesn’t seem to be applied and therefore doesn’t move.
This is a part of the script, it’s the moment when it’s created.
private void Disparar()
{
GameObject bala;
bala = Instantiate(municion, bocaArmaFusil.position, bocaArmaFusil.rotation);
bala.GetComponent<Rigidbody2D>().AddForce(bocaArmaFusil.forward * fuerzaInicial);
cantidadBalasFusil--;
}