Currently instantiating an object (a prefab) at run time via a button click. The object instantiates each time I click the button but it doesn't move even though I have added force to it.
Checked similar issues where its a mismatch of casting between GameObject and Rigidbody2D but this isn't the issue in my case. Tried switching between transform right and forward multiplied by a large number in case the value was too small for a change which doesn't make a difference either. Any help is appreciated. Thank you.
Following script is on the Player object. The prefab is instantiated from the object 'tip' which is a child object on the Player object. Rigidbody2D is set to Kinematic for bullet.
public Transform tip;
public Rigidbody2D bullet;
if (Input.GetButtonDown("Fire1")) {
Rigidbody2D clone;
clone = Instantiate(bullet, tip.position, Quaternion.identity) as Rigidbody2D;
clone.AddForce(clone.transform.right * 5000000);
}