So, I have a basic running animation. Now, How can I attach a gun to the hand? I’m not too familiar with the coding yet, thus i’m asking help.
You could
- create a null mountPoint on your character
- instantiate your “gun”
- and then parent (myGun.parent = mountPoint).
- mess with the myGun.localRotation to orient the gun.
You could also “find” the hand-bone in the Start() event and then parent the gun straight to the handbone. This way, you don’t have to mess with your imported model.
Sorry for the pseudocode … I am not at my dev machine.
Could you explain a bit more if and when you can? As said, I started using this a few days ago and I’m not too familiar with the system yet, + I’m not an pro coder.
Oh, and I’m using the fps package by dastardly banana if it changes anything.
heres a simple way just make the weapon invisible and when you need it trigger it visible cant remember the script off hand on visible or something like that.
Yeah but the weapon is a different mesh. My whole dang character will consist of multiple meshes. + I need to be able to switch to other weapons too.