0
\$\begingroup\$

I have made a character using MakeHuman, imported to blender and created a view animations. Then I imported the character as .fbx file into Unity. I set up an FPS scene with a player holding a gun in front of him. The camera is inside the character's head and the character is inside a capsule which is the actual movement controller. I basically just set the parent as needed. So if the gun should follow the hand I make the hand to be parent of the gun in the hierarchy.

I want the gun following the camera, so it is pointing exactly at the center of the players view where a crosshair is positioned.

But when I let the gun follow the camera, I can't let the hands follow the gun. And if I let the hands follow the gun, I can't let the gun follow the camera.

Is there some logical error in my mind or is this a common situation to find some individual method?

\$\endgroup\$
3
  • \$\begingroup\$ Usually hands are snapped to the gun with inverse kinematics, or "IK" — try searching that term and you should find lots of leads. \$\endgroup\$ Commented Apr 6, 2019 at 23:55
  • \$\begingroup\$ I know about them, i rigged my character using them too for elbows and knees (in blender). But how can i bind the bone to the gun inside unity? Or should i include the gun in the fbx? Until now i load it from a plain obj file not related to the fbx. But then i have the same problem with the camera. Should i include everything (including weapon and cam) into blender and export them (and theyr relations) to the fbx too? \$\endgroup\$ Commented Apr 7, 2019 at 0:29
  • \$\begingroup\$ Maybe you could try this: Make the character control the gun as your idea was. Then, camera would follow the gun by a script which would add a bit of artificial lag (use a LERP to rotate the camera). For hands... I would just connect them to the gun. It seems more natural if hands are a parent of the gun, but you can do it the opposite way too I guess \$\endgroup\$ Commented Apr 7, 2019 at 1:03

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.