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.
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?
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.
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!
The same thing done by this user.
Here is his project…
Maybe it will help…