3D Can help me with Controller Gun? found site for gun attach to hand and mouse control only arm hand and gun

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By linuxfree
:warning: Old Version Published before Godot 3 was released.

this solution is for blender engine game
Third Person Shooter Movement Example File - Game Engine Resources - Blender Artists Community if possible help me for make that for godot. thanks

If I had to actually see the character aiming (and not just a model overlaid on a first-person view), I would first attach the gun with BoneAttachment (see your previous questions for details), then I would create an animation where the character linearly aims from bottom to top. This animation won’t be played over time like most animations, see below:

Then, I would set the Y rotation of the character on its root, but instead of setting the X rotation on the arm, I would set it as the time parameter of the aiming animation and blend it over the other animations (walking…).
So the animation of the arm won’t be “played”, but scrubbed at a time according to the aiming angle. This creates a more accurate aiming visual.
You could set the arm’s rotation directly but it would look like a robot IMO.

You could go further and have a left-right animation for the Y-axis aim too, because rotating the character is going to look weird. In most games the character won’t actually rotate entirely if you aim at short angles, you have to do 90 degrees rotation at least to see the feets move.

The animation must also be precise enough to look aligned with the origin of bullets. And if it’s too hard, you can actually separate bullet spawning from the visual, so you are sure it won’t impact gameplay negatively.

Now, why is this a comment? That’s theory and assumptions based on what I know. I don’t know how to do that in Godot, but I believe that what I said is supported by the engine, you have to try this out, learn how animation blending works (and I have to learn it as well).

Edit: maybe IK could help too, but they are more CPU expensive.

Zylann | 2016-10-04 12:34

i try animate player with gun with using constrains in blender 2.75 and after export to godot and dont work fine.many distortions on actions animations.i will made player actions animations and gun actions animations firing and reload.then i go try attach gun to my player with boneattachment.Now i need know how set mouse yaw Y angle and Camera gun position for look arm hand and gun.Need use another boneatchment in bone arm with yaw and camera like child in this boneattchment node? Player will rotate all in Pitch X angle but only arm hand and gun will rotate Yaw. If possible help me

linuxfree | 2016-10-04 12:54

if anybody know how script rotate bone arm with gun attach with mouse and camera controller please post here and help godot 3D community

linuxfree | 2016-10-05 10:44