Hi all, so I am having a weird problem that I don’t seem to be able to fix.
I have a character model that is fully rigged and animated in Mecanim. The character is holding a rifle and in order to fire bullets, I have an empty gameObject that is a child of the rifle at the point of the gun barrel end. The transform is set so that the forward is facing in the same direction as the rifle and I instantiate a bullet and addforce on the forward vector and all is good and it works fine.
However, when I add a ragdoll to the character model, the bullets fire straight down at the floor, seemingly in a random fashion. I try to rotate the spawnpoint around, but the bullets just seem to randomly fly out of the gun, no longer following the pinpoint accuracy of them before.
Now, I first thought it was colliders, so I disabled all of the colliders created in the ragdoll process, but no go.
So, I started a new scene from scratch and imported two of the player models and started from scratch.
One I had no ragdoll, the other I created one. Step by step I added the guns, the spawnpoints and all related scripts and controllers.
When I play, the one without the ragdoll works fine, the one with, same again, fires into the floor.
I literally have no idea where to start troubleshooting this, so can someone throw some ideas into the mix please?
Any help would be great and hopefully, I am just missing something silly…