[#03] Unity Animation Rigging - Attaching a weapon using two bone IK constraint

[#03] Unity Animation Rigging - Attaching a weapon using two bone IK constraint

TheKiwiCoder

4 года назад

195,254 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Bruce Lee
Bruce Lee - 11.09.2023 08:45

does this work for 2d games as well?

Ответить
robbybobbijoe
robbybobbijoe - 29.08.2023 02:00

What if i just want the weapon to follow the positions of my hand, so that when my already made idle, walking, running and aiming animations have the weapon fit into the hands during those animations?

Ответить
Orlando Holwerda
Orlando Holwerda - 01.08.2023 22:58

i got 999 errors tried everything, spent 5 hours on it, and decide to no longer follow kiwis's stuff

Ответить
VRFX Realtime Studio GmbH / LLC
VRFX Realtime Studio GmbH / LLC - 02.06.2023 17:55

thanks for sharing

Ответить
Mike Wojcik
Mike Wojcik - 01.06.2023 17:06

If you are having issues with the animations not working, ensure all children of your weapon game object are uniquely named.

Ответить
stinknay
stinknay - 30.05.2023 11:56

Really nice video! Got it working with the 3rd person character controller starter asset and a different weapon. The challenge I am having is when my character jumps and lands... the weapon basically stays perfectly still (as knees are bending to a crouch position and then standing back up). So I would expect a little bounce. Can you recommend what I should research to fix this?

Ответить
Scott Medhaug
Scott Medhaug - 18.05.2023 21:38

very fun, can't wait for more

Ответить
Tigran Avagyan
Tigran Avagyan - 01.05.2023 10:50

Thank you very much!!!

Ответить
Keanine
Keanine - 20.04.2023 03:10

I used the standard scripting method to do this, but this still helped me understand how IK works and told me about the existence of hints when the Unity docs did not so thank you!

Ответить
Frankie Joubert
Frankie Joubert - 14.04.2023 12:46

Great tutorial. What I really appreciated about it was the fact that it wasn't just add the weapon to the hands through IK. That would have been good enough I guess, but you went to trouble shoot the issues of it not looking right and then how to address these issues. Thanks a mil.

Ответить
Nick Foster
Nick Foster - 12.04.2023 22:06

Thankyou for an excellent tutorial. I find myself somewhat confused. If you want to have multiple rigs say one for each weapon, how do you tell the animator which rig to use?
When building a rig, is it applied to the active animation in the animator or am I being my usual dumb self? IF anyone would care to show me the error of my ways, please feel free.

Ответить
chintan shroff
chintan shroff - 01.04.2023 22:37

Thanks dude. This is a great tutorial. Can you please tell me how can I even get the hip/spine to rotate if I for instance rotate the weapon to either side of the player, such that the hands are still able to reach the target points?

Ответить
Serpent Studio
Serpent Studio - 15.03.2023 14:13

Everything is working well but when i move the ch it will change the position of ik .When i stop it will get back

Ответить
Stephen Webb
Stephen Webb - 22.02.2023 01:25

Pro Tip: When you are setting up your 2 bone IK Constraint bones all you need do is populate the tip joint, then right click on the 2 bone ik components script header and select Auto Populate from Tip it also auto creates the IK_target and IK_hint game objects.

next pro tip - you can actually pose your character using the IK controls in edit mode if you have the Animation window open and click 'preview'. So no need to go back and forth between play mode and editor mode. In the animation editors 'Preview' mode you can also play the animations to see how they would look with the IK system. You'll notice that on the animation window if you press play in edit mode it will play the selected animation in Preview mode.

Ответить
Lim Teck En Nathan
Lim Teck En Nathan - 19.02.2023 12:41

y is it my flying above the ground when i try to hold a gun

Ответить
ElevateCode
ElevateCode - 16.02.2023 11:20

Fantastic video and very clear directions. Thanks for making it easy!

Ответить
Pixel Shenanigans
Pixel Shenanigans - 13.02.2023 08:19

Awesome video - perfect for what I was doing, and I never would have thought I'd needed the animation rigging package if I hadn't found this - thanks!

Ответить
The Good Son
The Good Son - 08.02.2023 20:25

Video is perfect, a bit slower on the clicks would be appreciated:) Had to watch it in reduced speed haha

Ответить
Empty
Empty - 23.01.2023 20:31

AMAZING

Ответить
Luke Johnson
Luke Johnson - 22.01.2023 21:47

I'm new to animations in Unity and really want NPCs to carry weapons. This tutorial is excellent. Thanks so much. Subbed!

Ответить
GameDev unity 3d (Livio Panizzi).
GameDev unity 3d (Livio Panizzi). - 16.01.2023 19:23

not fuction for humadoid?

Ответить
Heppu
Heppu - 13.01.2023 01:46

Me tweaking hand positions for 20 mins 😊
Me leaving play mode 😊
Me leaving play mode 💀

Ответить
3in1
3in1 - 26.12.2022 11:20

Transform 'Gun' not found in HumanDescription.

Ответить
Mr Potato
Mr Potato - 22.12.2022 11:06

It's been 2 yrs but plz reply, for me the hands are a bit behind the target, and if the target moves forward, the hands move forward too but they still do not meet with the target

Ответить
G-Man
G-Man - 13.12.2022 00:56

thx so much my friend!

Ответить
Albert Valdes
Albert Valdes - 07.12.2022 11:40

Can anyone please let me know how to fix the issue with elbows bouncing while walking/running?

Ответить
Patek2
Patek2 - 08.11.2022 10:01

Why the fuck is this tutorial jumping from two different character controlers every episode?

Ответить
BONSE 2000
BONSE 2000 - 03.10.2022 02:19

if i dont have r or l hips and elbows it will work?i have rig for mixamo and they dont use thats

Ответить
John Ephraim Himala
John Ephraim Himala - 29.09.2022 08:59

Is the controller used here from [#1] or [#2]?

Ответить
JO5EF
JO5EF - 20.09.2022 14:24

The video I was looking for. Thank you so much.

Ответить
ZxDelt
ZxDelt - 17.09.2022 05:33

nice one

Ответить
Alain Thénot
Alain Thénot - 03.09.2022 09:11

Thank you man, awesome tuto!!

Ответить
Steven Ray Pickett
Steven Ray Pickett - 20.08.2022 12:54

Learned alot with this video! Thank you!

Ответить
ChadGatling
ChadGatling - 18.08.2022 01:35

Take my like. I have been trying to figure out why my IK was not moving with my gun and it was this video that introduced me to the Rig Transform component. Thank you.

Edit: Actually the left hand does not stick to the gun when it is moved by other constraints on the rig. The hand position is on another Rig just below the aiming rig. Do constraints only take into account other constraints on the same rig?

Edit edit: I was able to workaround this issue. I originally had:

Aim Rig (Only on when aiming)
Aim Constrain
Aim Constrain
Left Hand Rig (Always on)
IK Constraint

The workaround is:

Left Hand Rig (Always on)
Aim Rig (Only on when aiming)
Aim Constraint
Aim Constraint
IK constraint

The IK now properly calculates the position to the left hand placement. Tho with a bit of a lag oddly(not sure what's up with that). Constrain order is very important!

Ответить
Harry
Harry - 11.08.2022 16:24

This is such a godsend. Seriously, straight to the point, comprehensive and MOST importantly - doesn't start with "create a new unity project and build your entire game around only this one feature working". It's so helpful to have a tutorial that understands it's going to be used in the real world and fits in with other workflows. For instance, I saw a similar tutorial that required you to rebuild your entire character rig from scratch in blender and put you into a workflow where many animation features would then be impossible down the line. Great job!

Ответить
Declan Moloney
Declan Moloney - 30.07.2022 15:49

Hey there Kiwi, I’ve followed your tutorial which I found great. But when I start my timeline the character let’s go of the weapon and runs past it, Is there a reason for this?

Ответить
Pat176
Pat176 - 07.07.2022 18:24

This is like the fourth time I'm seeing this video, I've finally understood and now I can do this without watching again and again. Thanks a lot.
Hoping you'll be active again.

Ответить
Yuri Natividade
Yuri Natividade - 02.07.2022 23:44

Kia ora! best Animation Rigging tutorial so far... Good work!

I still watching your other videos, I'm looking for the best practice to apply animation using the Animation Rigging.
The use case I'm trying to reproduce is draw\save\aim the guns and blend those animations with the idle/walk/run animations..

Ответить
Pietrofonix
Pietrofonix - 12.06.2022 16:10

What if i want to equip another weapon? How can i change the rig in runtime so it adapts to the new weapon?

Ответить
NIKH STUDIOS
NIKH STUDIOS - 22.05.2022 13:30

hey my charecter is floating in the air how can I fix this

Ответить
MsE Game Dev
MsE Game Dev - 18.05.2022 18:44

Great tutorial. Very useful. Thanks!

Ответить
Thircidia
Thircidia - 23.04.2022 13:25

Videos are great. Would be awesome if they where more of a continuous series other than some what separate videos. Still they are awesome.

Ответить
Pabloware Games
Pabloware Games - 22.04.2022 22:55

Is there a way to get rid of that elbow bounce?

Ответить
オム
オム - 21.04.2022 19:15

can we attach any weapos

Ответить
Alpha Wolf Gaming
Alpha Wolf Gaming - 12.04.2022 05:29

very nice video! subbed

Ответить
Random Variable
Random Variable - 15.03.2022 16:28

bro error is coming
System.InvalidOperationException: The TransformStreamHandle cannot be resolved.
Thrown from job: UnityEngine.Animations.Rigging.TwoBoneIKConstraintJob
This Exception was thrown from a job compiled with Burst, which has limited exception support. Turn off burst (Jobs -> Burst -> Enable Compilation) to inspect full exceptions & stacktraces
this one

Ответить
Maskeowl
Maskeowl - 20.02.2022 15:20

i think its bugs my gravity when i change animations sen helppleaseee

Ответить
Abhimanyu kaushik
Abhimanyu kaushik - 10.02.2022 05:56

Hi my player automatically changes his position on play. It starts to float in the air but the weapon stays on ground .Any solution ?

Ответить