spawn position of ragdolls keep doubling
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<Rigidbody2D>();
rb.AddForce(shootPos.up * bulletForce, ForceMode2D.Impulse);
Debug.Log(shootPos.position);
Destroy(bullet, 5f);
}
}
Thanks in advance! Daan
Comment
Your answer
Follow this Question
Related Questions
Graphic Raycasting doesnt work on all children canvases 2 Answers
transform.LookAt on 2d 0 Answers
Dynamic Wave Manipulation 0 Answers
Unity Cross platform input not working? 2 Answers
Does anyone have this Problem? - iOS build crashes on Unity 2020.1 1 Answer