Quantcast
Channel: Questions in topic: "addforce"
Viewing all articles
Browse latest Browse all 1264

Bullet not moving rigidbody2d,AddForce not working for bullet

$
0
0
Hello, I am currently trying to create a enemy in my space shooter that spins and fires random bullets. My issues is when it fires the bullets the bullets are stuck where they instantiated. I am trying to use addforce but I must be doing something wrong. GameObject laser_1 = Instantiate(E_Bullet, shootDirection1.position, shootDirection1.rotation); Rigidbody2D RB = E_Bullet.GetComponent(); RB.AddForce(transform.forward * E_Bullet_Speed); Also here are the setting of my bullet which is fired from a empty called shoot direction. ![alt text][1] [1]: /storage/temp/170224-rigbody.png

Viewing all articles
Browse latest Browse all 1264

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>