Bullet Velocity not adding up

Hi guys, i am trying to add velocity to my bullet but when it spawns it just stays at the spawn site and my velocity does not add up
Here my code

if (Input.GetKeyDown (KeyCode.Space)) {

GameObject beam = Instantiate (bulletShip, transform.position, Quaternion.identity);
beam.GetComponent().velocity = new Vector3(0, bulletSpeed, 0);

}

Solved : Need to readd Rigidbody2d Component

1 Like

Privacy & Terms