Quantcast
Channel: Questions in topic: "ragdoll"
Viewing all articles
Browse latest Browse all 565

spawn position of ragdolls keep doubling

$
0
0
Hi! I'm having a problem with ragdolls, for some reason they only get force applied to them when I aim a little down and their spawn position is doubling for some wired reason, meanwhile its only a problem with the dolls, a normal object works just fine.. Here is a video to illustrate: https://www.youtube.com/watch?v=b-_Kdm-Jhsk&feature=youtu.be this is the code I used: void Shoot() { if (Input.GetButtonDown("Fire1")) { GameObject bullet = Instantiate(bulletPrefab, shootPos.position, shootPos.rotation); Debug.Log(shootPos.position); Rigidbody2D rb = bullet.GetComponent(); rb.AddForce(shootPos.up * bulletForce, ForceMode2D.Impulse); Debug.Log(shootPos.position); Destroy(bullet, 5f); } } Thanks in advance! Daan

Viewing all articles
Browse latest Browse all 565

Trending Articles



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