Hello
I wanted to create a new topic instead of continuing the old one to not make it confusing since my questions there were solved.
I want to achieve a good reload animation where the player takes the magazine out of the gun and puts it back in. I already have a hand animation that reloads and also a gun animation that simulates taking the magazine out of the socket.
I have managed to attach the magazine from the gun to the player hand when the reload animation plays however the rotation of the magazine becomes really broken. I can’t get an optimal rotation for the magazine because when I set the rotation manually in the code for some reason every time I reload the rotation changes every single time. How can I fix the rotation being broken when I parent something?
I also want to be able to achieve the player holding the magazine with the full hand (palm) rather than it being attached to 1 bone. Will it be possible to attach it to multiple finger and thumb bones to get an optimal holding effect?
Below is the same sample project:
https://playcanvas.com/project/876670/overview/anim
I also got 2 more related questions:
-
Is it possible to attach part of the player arms to a part of the gun? So for example attaching the left hand of the arm to the weapons grip bone. I can attach individual items like gun, mag to the hand but I cannot attach the left hand bone to the grip bone of the gun for some reason. I get the error:
Cannot read properties of undefined (reading 'name')
I usedthis.leftHandBone.reparent(this.gripBone);
. -
Currently some fingers of the hand model goes through the gun/magazine. How can I make it so they don’t clip through? I would really like to attach the hand to the guns grip rather than what it is now because at the moment the hand goes through the magazine of the gun.
Overall I want to achieve/simulate the player holding the gun in an optimal way with a good reload animation where it looks like the hand is holding magazine and nothing clips through each other. Also eliminating any rotation problems.
I would appreciate your guidance