How would i go about putting a weapon into both hands of a 3d model?

Im trying to make a blockchain fps game with character models but im not sure how to go about getting the weapon to be in both hands. Both the hands are different objects of the player skeleton but i have no idea how to get one end of a weapon in one hand and the other hand on the other end.

Hi @Granted,

That usually requires some sort of inverse kinematics (IK). A way for certain bones to snap to a world position and blend with the rest of the animation.

There isn’t support for that right now in PlayCanvas, so not sure if you can approach this in some way. @Elliott any comment on this?

Hi,

I agree with @Leonidas that this would be a great use case for inverse kinematics within PlayCanvas. Though we don’t officially support IK, other developers have managed to integrate open source IK libraries with their games.

An alternative solution would be to edit the original animation using software such as Maya or Blender, so that both hands are positioned according to the object they should be gripping on to.

3 Likes

Ok so im not sure about this but could i possibly go and put the weapon model into one hand, put a entity in the other and update the rotation of the weapon to face that entity in the seperate hand? Or would that be really slow?

HA YES! Mixamo for the win WOHOOO!

Screenshot 2023-06-01 10.00.17 AM

1 Like

Hello
The same thing done by this user.

Here is his project…
https://playcanvas.com/project/730082/overview/gamepad-third-person-controller

Maybe it will help…

1 Like