In BGE, I have two cubes named l_hand and r_hand that represent (and move as) first person hands (moved by mouse / keyboard). I want to be able to pick up a staff (a stick) with both hands and have that staff move (articulate pitch and yaw) as if it were being held and handled by both hands. Sort of like a samauri sword grasp with hands a short space apart but both holding the staff. I also want to be able to put that down after use.
I would parent the staff to a weapon bone in the right hand, and then just play an animation of both hands grasping the weapon, one above the other in a standard grip.
Sorry for not being clearer. I have two cubes in a game module that are moved real-time by mouse and keyboard. They “represent” the location of two hands which possess no skeleton infrastructure - they’re just free floating cubes that “represent” hand locations in space (the implied character is static). As you suggested, if I parented the second hand to the staff then the staff would not “move” from the combined influence of two objects (the hands [cubes]). For instance if you put one fist (grasped) straight out in front of you and the other fist (grasped) 12 inches above the first you could hold a stick vertical in front of you since that is the relationship between your hands. When you pulled your bottom fist toward your (implied) torso then the top tip of the staff would tilt forward away from you. This is the type of manipulation I am looking for.
I can’t “play an animation” since the cubes are moved dynamically in real-time.
Oh, okay. That’s not too difficult. It has to do with Python, but the idea is this:
Parent the spear to, say, the right hand.
MOVE the left hand to the right hand’s position, but down a little (one hand height).
Now here is where it gets interesting. Rotate the spear to be the angle from the left hand (lower) to the right hand (upper). Then, rotate each hand to face that angle as well. Euler variables will be your friend in this case.
The hardest part will be the third portion. It sounds interesting, though!
I think he wants it to be absolutely dynamic, wherefore getting the Vector between both Hands would be calculated and then direct the Staff towards that particular Axis.
Though I think SolarLune is better with these Things – Vectors have never been my Strength…