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

  Рет қаралды 204,659

TheKiwiCoder

TheKiwiCoder

Күн бұрын

Пікірлер: 411
@StephenWebb1980
@StephenWebb1980 Жыл бұрын
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.
@consultingprestig2096
@consultingprestig2096 Жыл бұрын
Thank you broo i love you
@StephenWebb1980
@StephenWebb1980 Жыл бұрын
There is also one more Caveat I forgot to mention - If you have Use Root Motion selected on your character, then press the preview button or the play animation button, your character will snap to it's parents world position. I have a Player System object and under this I have the model, my Player System object was located at the world origin, but the character was not. When I was Root Motion in the animator controller, it would snap my model to that location - so if you're gonna use root motion, be sure to either turn it off when you are doing your IK adjustments, OR make sure that your animated model is at the same location as it's parent. You're welcome. 8)
@StephenWebb1980
@StephenWebb1980 Жыл бұрын
And hey, Kiwi coder - excellent work brother.
@Harry-dh2pm
@Harry-dh2pm 2 жыл бұрын
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!
@Klenzer
@Klenzer 3 жыл бұрын
For anyone struggling on getting the hands to snap to the weapon...You have to make sure that the RigLayer is IN the mesh your working with (SM_Character_Male_01 in this case) and that the "gun" object is ALSO a child object of the mesh. Wasn't too obvious to me and took a few hours to figure out. Looks something like this: v SM_Character_Male_01 Character_Male_Face_01 > Root > RigLayer v Gun ref_right_hand_grip Later in the video, TheKiwiCoder also points out that you can put the gun within the root parent to follow transformations. This still works. Thanks for the awesome video!
@kurtjenkins2646
@kurtjenkins2646 3 жыл бұрын
mine still aint working :(
@chandings
@chandings 2 жыл бұрын
Thanks
@cameron2327
@cameron2327 2 жыл бұрын
Thanks
@kenzozwierzycki1270
@kenzozwierzycki1270 Жыл бұрын
F* Legend! Thanks
@Zhokken
@Zhokken 2 ай бұрын
thank you so much bro😘
@rameezsafdar6563
@rameezsafdar6563 4 жыл бұрын
This is the finest tutorial on Animation rigging on Unity. You explained everything and very clearly. Subscribed!
@GameplayAaZ
@GameplayAaZ 2 жыл бұрын
def
@Keanine
@Keanine Жыл бұрын
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!
@TheKiwiCoder
@TheKiwiCoder Жыл бұрын
Awesome! There’s another built in Ik system too you can use as an alternative to this.
@FrankTank7777
@FrankTank7777 Жыл бұрын
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.
@knightoftheblood1841
@knightoftheblood1841 25 күн бұрын
Thank you. I thought IK was really hard. I never tried it before because I was intimidated by people saying it’s difficult. Turns out it’s really easy with the Animation Rigging package.
@TheKiwiCoder
@TheKiwiCoder 14 күн бұрын
Yes! The words make it sound complex
@PabloTheDolphin
@PabloTheDolphin 4 жыл бұрын
You're an absolute god. Your videos are packed full of only useful information and no excessive pauses or explanations. And using all the latest tech from unity to boot (except the new input system but that's easy enough for me to refactor myself).
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
Thanks for the kind words :) Cinemachine & Animation rigging is a great combo. I'm yet to checkout the new input system or dots tho
@Mrjononotbono
@Mrjononotbono Жыл бұрын
I'm new to animations in Unity and really want NPCs to carry weapons. This tutorial is excellent. Thanks so much. Subbed!
@TheKiwiCoder
@TheKiwiCoder Жыл бұрын
Muchas gracias
@megascan
@megascan 8 күн бұрын
Thanks bro! Very informative and useful even 4 years later!
@hunterhunter298
@hunterhunter298 3 жыл бұрын
for those of You guys, who struggls with floating character, just make sure that none of your bones is somehow scaled. in blender or whatever editor You use, apply all transforms (scale, rotation) to your character before export FBX, and may god be with You
@christophkrass6929
@christophkrass6929 3 жыл бұрын
I did. It's still floating....
@yeetbox5843
@yeetbox5843 3 жыл бұрын
Hey! I'm new in Unity and I have same problem. I imported my character from assets store, what to you mean by making sure that none of bones are scaled?
@hunterhunter298
@hunterhunter298 3 жыл бұрын
@@yeetbox5843 just check few random bones transform for being scaled for example 0.99999 on some axis. Or sometimes bones could be ok, but mesh is scaled 100
@McPatoo
@McPatoo 10 ай бұрын
Well, for me at least, it works better if you place the gun inside the spine (chest of your character rig). Therefore, the gun can rotate in the same way as the characters' rotation.
@johnbon7449
@johnbon7449 4 жыл бұрын
Thanks! You saved me hours with "Rig Transform" on the gun
@dftpunk
@dftpunk 2 жыл бұрын
Is only needed if the gun is a child of a character
@devensmith8495
@devensmith8495 2 жыл бұрын
@@dftpunk Thank you so much I don't know why but if I put a rig transform on my gun I cannot change any of the guns transform values which is exactly why I need it to aim the gun up and down. I spent at least an hour trying to solve this and saw your comment and just unchilded the gun. Didn't fix the rig transform not working but it gave me a work around.
@patrick17_6
@patrick17_6 2 жыл бұрын
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.
@drr1867
@drr1867 4 жыл бұрын
Outstanding tutorial - thank you so much. My character is a Mixamo model so rig structure different but I still got it to work.
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
Thank you! Awesome it worked for you :)
@mnursey
@mnursey 4 жыл бұрын
Hey, what adjustments did you have to make to get the Mixamo model to work? Thanks
@Saila36
@Saila36 4 жыл бұрын
I also have a Mixamo model but how did you make it work?
@gamin8ing
@gamin8ing 3 жыл бұрын
@Shamshad Jaweed ya, same here, but do you got a fix, because we can't always use the polygon pack ¯\_(ツ)_/¯
@gamin8ing
@gamin8ing 3 жыл бұрын
@Shamshad Jaweed how bro?🙏🤔 wait I think, that my gun pivot is making some weird movements, don't you think it will affect the character?
@pixelshenanigans1511
@pixelshenanigans1511 Жыл бұрын
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!
@TheKiwiCoder
@TheKiwiCoder Жыл бұрын
Great to hear!
@BlueAccentGamingYT
@BlueAccentGamingYT Жыл бұрын
The best thing since peanut butter my guy. You just saved me a ton of time!!!
@SebastianGraves
@SebastianGraves 3 жыл бұрын
Hey there Kiwi, do you know if this system was ever updated to support the ability to change the source object with code? You see I have a character that is constantly changing weapons, and therefore needs to be able to change the source points when those weapons are changed. I am seemingly unable to reference the source object via script even when using UnityEngine.Animation.Rigging; Think you could point me in the right direction? Great video! Cheers.
@TheKiwiCoder
@TheKiwiCoder 3 жыл бұрын
Hi you can reference the source objects via constraint.data.sourceObjects. It's also possible to add multiple source objects to the constraint and toggle the weights of each on/off via script or animation. Hope that helps
@firebolttz9058
@firebolttz9058 Жыл бұрын
I have witnessed two legends talking to each other O^O
@ilovecatplayingchess
@ilovecatplayingchess Жыл бұрын
@@firebolttz9058 lol
@yurinativo
@yurinativo 2 жыл бұрын
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..
@Lightkitara
@Lightkitara 4 жыл бұрын
Thanks for the video! I managed accomplish this behavior for my character just yesterday but your solution seems a lot more straightforward.
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
No probs! I’m interested, what was your solution?
@Lightkitara
@Lightkitara 4 жыл бұрын
@@TheKiwiCoder I had references under Rig hierarchy for both the handle (meant for R_hand ) and the barrel (meant for L_hand ) of the gun. Then I used m_parent constraint to hook the handle to stick with the right hand ik. But then I ran into a problem because the same trick wouldn't work for the left hand and the same time. So I hooked the left hand to stick with the ref_barrel by using again multi_parent. So in the end the constraint hierarchy was something like this from the top: right_hand_ik => gun regerences => left_hand_ik where r hand ik naturally controlled the movement. And well it worked but I still had some trouble with the gun's orientation :D
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
Lightkitara Interesting idea to use the right hand to control the gun! I made the hand IK references children of the weapon to make switching weapons a bit easier.. that was the idea anyway. Whenever I get orientation issues I double check the ‘Maintain offset’ parameters on the constraint. The position and rotation constraints can be used in place of the parent constraint, giving you separate control over each. They let you specify offsets too.
@RegenerationOfficial
@RegenerationOfficial Жыл бұрын
2:00 setup base ik rig 3:00 setup hand position reference at object like "hand handler" | replace reference with target in ik 5:10 add rig transform to "hand handler"
@BORNIS
@BORNIS 2 жыл бұрын
Cool, thanks! Hello to Russia too :) Your guides are the best, keep up the good work))
@DJLKM1
@DJLKM1 4 жыл бұрын
How would this work for switching animation states, like from having a pistol equiped and switch to a rifle. would you have to create multiple ik nodes for each weapon type within the player prefab? and im guessing setting each node weight in code...
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
Remember that animation states can also animate the properties of the rig, such as weights. It would be a mix of this and scripts to swap out the weapon and control targets. The easiest method I’ve found for authoring is defining the ik targets in the weapon prefab.
@DJLKM1
@DJLKM1 4 жыл бұрын
@@TheKiwiCoder Hi, yeah i was thinking of the same method, reference the ik nodes in each weapon prefabs script. Im currently making a GTA style game, but so far havent even started the weapon systems. Just been looking around to try and solve issues before i get to them, so far ive got most of the systems coded: Player movement, day and night cycle with time, health and armor, wanted level system (for player and peds) police units up to the army, EMS coded also, all the UI inc minimap and a world map, money system inc ATMs & currenty using the city demo scene to develop it all on. Ive been trying this project for a few years now, using the synty packs, the last project ran into big issues that i couldn't easily solve. I had more systems done for that project, like vehicles with real physics and weapons (minus any ik), so i can reuse some code from there. Thanks for getting back, most don't and that's not helpful.
@cooldev2203
@cooldev2203 3 жыл бұрын
@@TheKiwiCoder ok but how
@TheKiwiCoder
@TheKiwiCoder 3 жыл бұрын
@@cooldev2203 keep following the series, or jump ahead. Theres videos later on that cover weapon switching.
@A5tr0101
@A5tr0101 10 ай бұрын
Thank you for this, it helped me so much in understanding unity rigging!
@heppu7425
@heppu7425 Жыл бұрын
Me tweaking hand positions for 20 mins 😊 Me leaving play mode 😊 Me leaving play mode 💀
@TheKiwiCoder
@TheKiwiCoder Жыл бұрын
Did you make it back to play mode? 🤞
@robbybobbijoe
@robbybobbijoe Жыл бұрын
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?
@nikrbawker
@nikrbawker 3 жыл бұрын
Superb they've really kept going with Unity. Getting closer to not needing code although I still think code helps tie things together a lot better. Still possible to make great stuff without it though. First time really using Unity a lot since 5. Working on a game, it's a pretty big project but trying to keep it humble in every way that will still go over smoothly.
@xdplai3190
@xdplai3190 4 жыл бұрын
can you make a tutorial like this for fps games
@michaelmcveigh9534
@michaelmcveigh9534 3 жыл бұрын
This is a great tutorial and highly underrated channel. Thank you!
@ElevateCode
@ElevateCode Жыл бұрын
Fantastic video and very clear directions. Thanks for making it easy!
@farrukhmalik8747
@farrukhmalik8747 4 жыл бұрын
Tutorial on TPS Controller for mobile Please...
@ChadGatling
@ChadGatling 2 жыл бұрын
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!
@adrixnperez
@adrixnperez 4 жыл бұрын
I'm following the tutorial but I have a problem with Rig Transform, doesn't work on play mode (doesn't update the position when is attached to the weapon, but if I move the position of the gun and press the play mode, the rig transform is updated...) I don't know what is happening, any solutions?
@davidson2727what
@davidson2727what 3 жыл бұрын
I know this is from a few months ago but I had this problem too. I updated to unity 2020.3 LTS then things worked like in this video
@adrixnperez
@adrixnperez 3 жыл бұрын
@@davidson2727what thanks, I will try now
@hengky19071992
@hengky19071992 4 жыл бұрын
how to fix the aiming pose, the left hand wont reach the grip?
@mgodoi3891
@mgodoi3891 4 жыл бұрын
Is exciting how technology evolves. I was wondering If Someday we tell to unity "grab that shit", "i want to move the character at 5 km/h" and he does. Lol. Would be fun. And we can spend more time worryng about telling a nice story instead of configuring weird shit.
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
Yeah.. unity is sorely missing a decent third person template like unreal has.
@noptanakhon6650
@noptanakhon6650 4 жыл бұрын
Great, I need more tutorial about animation rigging
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
Checkout my follow up video to this one! kzbin.info/www/bejne/l5vQoWaAbLNmhdk
@orim2793
@orim2793 4 жыл бұрын
big thanks for you !! small question If I have different guns the fingers are arranged differently. Should I do animation for each rifle individually or is there a way to do it in Unity?
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
A different animation for each weapon is likely easiest.
@wjsjason163
@wjsjason163 4 жыл бұрын
Thank you for this great video! But I have one question during the procedural, that I'm using a custom character and with its avatar, there is no left nor right clavicle in the list, so when I'm trying to attach the gun under the player's avatar, right arm or right shoulder, the arm and hand just twists and I'm unable to fix it. So what should I do if I don't have clavicle? PS: I got the rig from mixamo.
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
It’s not detailed in this video, but you could use a multi parent constraint and attach to the spine or hips, with an offset.
@wjsjason163
@wjsjason163 4 жыл бұрын
@@TheKiwiCoder Thank you! I also have another question, which what do i need to write in script in order to disable the Rig Builder component during the game is running?
@raveheart58
@raveheart58 4 жыл бұрын
WJS Jason setting the weight to 0 should disable everything
@zombievirals
@zombievirals 4 жыл бұрын
So glad someone else had the same issue as I did, multi parent constrain on the spine, and I set the weapon as the constrained object, works like a charm!!
@SacWebDeveloper
@SacWebDeveloper 10 ай бұрын
This is probably pretty cool for realistic games, but I think its probably just overkill for arcade style games. I think I'll stick to one parent with pre-baked animations. The other thing is, if your characters are very stubby toons, they might not be able to hold a gun with two hands.
@fatefox2018
@fatefox2018 9 ай бұрын
can you do a tutorial on how to make the arms unaffected by the rotation of it's parent please?
@jorgemedina8497
@jorgemedina8497 3 жыл бұрын
If you don't find Animation Rigging, make sure to: 1 - Open your project in Unity and go to Window > Package Manager 2 - Open the “Advanced” drop-down and make sure “Show Preview Packages” is set 3 - Select Animation Rigging in the list and click install
@luisfernandorojas107
@luisfernandorojas107 3 жыл бұрын
Thanks :D
@Pietrofonix
@Pietrofonix 2 жыл бұрын
What if i want to equip another weapon? How can i change the rig in runtime so it adapts to the new weapon?
@patrick17_6
@patrick17_6 2 жыл бұрын
He's shown it in his different video
@jamesfarrell1415
@jamesfarrell1415 3 жыл бұрын
I am having issues with the ref_right_hand_grip. It only works when I bring it past the ground instead of on the gun like your video, any tips? Thanks
@AkashRana-hi5ec
@AkashRana-hi5ec 3 жыл бұрын
Best video till now, everything explained with so simplicity 🔥🔥🔥❤️ Really,Great work bro
@danielemessina1979
@danielemessina1979 2 жыл бұрын
Great tutorial. I am using the same assets but the hands don't stay attached to the IK reference points, they only loosely follow them and it's impossible to place them correctly. The two bones are set correctly. I noticed that the prefab is scaled 0.01. It seems to work in a different model which is not scaled. Could that be the problem? EDIT: this happens with the prefabs in the prototype pack, it works fine with the characters in the starter pack.
@imakeinternetdev
@imakeinternetdev Жыл бұрын
If you are having issues with the animations not working, ensure all children of your weapon game object are uniquely named.
@isjesse1
@isjesse1 8 ай бұрын
Thank you so much, so much info in such a short time.
@jo5ef348
@jo5ef348 2 жыл бұрын
The video I was looking for. Thank you so much.
@thecreativity5793
@thecreativity5793 4 жыл бұрын
Can u make a quick tut about aiming and shooting? ..this vid helped me a lot. Tnx man!
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
Hey! This video shows how to aim a weapon: kzbin.info/www/bejne/l5vQoWaAbLNmhdk Shooting tutorial coming soon!
@drhollow_on_hogwarts8778
@drhollow_on_hogwarts8778 4 жыл бұрын
This is awsome , can you please tell me how Can I make the hand Ik override all animations over the whole arm ?(because this adds some unwated movements )
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
It might be better to use a layer mask for that, if you want to override the entire upper body. Or just add additional constraints to the other bones.
@drhollow_on_hogwarts8778
@drhollow_on_hogwarts8778 4 жыл бұрын
@@TheKiwiCoder thanks , You are a true Savor
@nguyentrananhnguyen7900
@nguyentrananhnguyen7900 3 жыл бұрын
trying to use a different character with mixamo animation but the hand rotation is not working. Anyone have any ideas how to fix it?
@thircidia7024
@thircidia7024 2 жыл бұрын
Videos are great. Would be awesome if they where more of a continuous series other than some what separate videos. Still they are awesome.
@killsnipereye
@killsnipereye 6 ай бұрын
How would you go about guns that have for exampe grip attachments where the left hand need to switch between different locations and poses?
@pulkitmidha5710
@pulkitmidha5710 3 жыл бұрын
I didn't get what exactly Hint does? BTW, great content, dropped a follow!
@John-mp8sm
@John-mp8sm 3 жыл бұрын
It kinda helps set where the elbow goes out to, so if you move the hint to the left. the elbow will poke out to the left
@3rdperson2
@3rdperson2 4 жыл бұрын
Excellent job!! You got a new subscriber!
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
Thank you!
@u-lo-l
@u-lo-l Ай бұрын
Could not resolve 'mixamorig:Hips/mixamorig:Spine/mixamorig:Spine1/mixamorig:Spine2/mixamorig:RightShoulder/mixamorig:RightArm' because the avatar is invalid. Please assign a valid Avatar or create one with AvatarBuilder.
@chntnshrff
@chntnshrff Жыл бұрын
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?
@TheKiwiCoder
@TheKiwiCoder Жыл бұрын
Hey that sounds like you’re after a full body ik solution. This vid might help! kzbin.info/www/bejne/h2aZoqh_d5emhck
@chntnshrff
@chntnshrff Жыл бұрын
Wow thanks so much man. I ended up using chain ik constraint which worked for my current game. But you video seems to be more comprehensive. Will definitely check it out.
@michaelmcveigh9534
@michaelmcveigh9534 3 жыл бұрын
When I initially setup my character I added some animation clips from mixamo and attached the gun as a child of the character's hand. This kept the gun in place during my character's running animation. Does anyone have suggestions for how to maintain this behavior, but then switch to IK (as shown in this video) when aiming?
@TheKiwiCoder
@TheKiwiCoder 3 жыл бұрын
My latest video will release today which covers this!!
@TheKiwiCoder
@TheKiwiCoder 3 жыл бұрын
@Nagato is better than Punk Naruto any reason to use ik? Might be easier to use animation and keyframe the hands to the correct locations throughout the clip
@jettblackmemes
@jettblackmemes 4 жыл бұрын
im stuck in t pose.........hands cant attach to the gun .......im using mixamo swat model
@truong-px
@truong-px 4 жыл бұрын
hello, i need help, please! I have a list character for character selection, so now. How can i attaching weapon for them?
@robosergTV
@robosergTV 3 жыл бұрын
this channel is gold
@MarioLau-o2i
@MarioLau-o2i 4 ай бұрын
Great tutorial,but here I have an issue,which is when I attached Rig Builder to the character and hit play,the model gets stuck into the ground.Does anyone know how to solve it?
@mrpotato8196
@mrpotato8196 Жыл бұрын
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
@kalkiarts1046
@kalkiarts1046 4 жыл бұрын
please make a tutorial on weapon scoping
@VJoK3R
@VJoK3R 2 жыл бұрын
Learned alot with this video! Thank you!
@Froxty00
@Froxty00 2 ай бұрын
love the content it helped me out a lot keep it up
@abderrazeksimmou8753
@abderrazeksimmou8753 4 жыл бұрын
you offer us a tutorial for topdown shooter game ?? And thank you for this tutorial
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
Great idea. Thank for the suggestion!
@abderrazeksimmou8753
@abderrazeksimmou8753 4 жыл бұрын
@@TheKiwiCoder thank you 😊
@sshhiittoo2
@sshhiittoo2 4 жыл бұрын
I'm having problems with my Hint_R when the player run, the arm make strange movements and I tried to move the Hint GameObject but it stills doing this. Anyone have any idea?
@qbicvideo
@qbicvideo 3 жыл бұрын
Do you have solution?
@nipeerc
@nipeerc 3 жыл бұрын
Had the same issue, usually the hand or elbow is over rotated try adjusting
@TheGoodSon89
@TheGoodSon89 Жыл бұрын
Video is perfect, a bit slower on the clicks would be appreciated:) Had to watch it in reduced speed haha
@scottmedhaug4107
@scottmedhaug4107 Жыл бұрын
very fun, can't wait for more
@bonse2000
@bonse2000 2 жыл бұрын
if i dont have r or l hips and elbows it will work?i have rig for mixamo and they dont use thats
@juliegaming3541
@juliegaming3541 4 жыл бұрын
hello i followed your tutorial but i have a custom model and it seems like its leans to the right like the whole body is rotated to the right and the feets are like in the air
@juliegaming3541
@juliegaming3541 4 жыл бұрын
its when i put the weapon in Source Object/Target (2:37) that it starts to happen not sure why
@tommyjoeakatojo1571
@tommyjoeakatojo1571 3 жыл бұрын
sir i cant rotate and change position when in game mode of the bones
@duh160
@duh160 4 жыл бұрын
someone help me...i have got r parts in the hand ...that is shoulder,arms,forearms and hands....but in two bone ik there are 3 parts to keep...that is tip,mid and root...if i miss one then it is not having a normal animation when i am walking...what should i do now?
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
Assign the 3 bones that make the most sense.. shoulder joint, elbow joint, and wrist joint.
@nickfoster8721
@nickfoster8721 Жыл бұрын
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.
@lieutenantundercover9329
@lieutenantundercover9329 3 жыл бұрын
Nice Tutorial! I like the background music too! What is the name of it?
@blackfrogstudios6670
@blackfrogstudios6670 4 жыл бұрын
I cant get the two bone IK constraint to work. I added my rig layer and everything, and ive set my source to be the gun, but when I press play, my player mesh snaps to a far away position, and then starts floating in random directions. What is even more odd, is that my gun, which is a child of my character mesh, stays where it is meant to be (since it is a child of the character mesh, which is the child of the empty parent which contains player movement), but the character mesh does not. I'm not exactly sure what is causing this, could it be that I set my player movement on an empty, then had my mesh with my animator as a child to it? If anyone knows how to solve this, I would greatly appreciate help.
@calicospartan4251
@calicospartan4251 4 жыл бұрын
I had a similar issue and found my answer at answers.unity.com/questions/1745150/why-does-animation-rigging-send-my-rigged-characte.html . The issue had to do with the scale of my character's root bone
@nikrbawker
@nikrbawker 3 жыл бұрын
Hmm I might have to base my animations off of these ones. My character is pretty jank when I run. pokes his arms forward in a weird fashion while holding a pistol.
@daveyyyyyyy
@daveyyyyyyy Ай бұрын
Hint makes the two arms so glitchy when walking, how to fix that?
@klintcabornay3637
@klintcabornay3637 4 жыл бұрын
Have you tried recording via Animation window while in Play mode? and using the Multi-Referential Constraint?
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
I have not tried that yet, though I’m interested to hear the results!
@igorpuschner786
@igorpuschner786 2 жыл бұрын
I love your tutorials mate, the only problem I have is that the Animation Rigging package is actually just a buggy mess, like "Animation rigging offsets model root by several meters since version 2020.2.0a21". This is so frustrating! I am back to coding my own (working) solutions for now. Sad that the only things that seem to really work in Unity are the things that are from version 5. Anyway, keep up the good work!
@paulmeynckens6676
@paulmeynckens6676 4 жыл бұрын
wonderful tutorial. works fine for me.
@FoxGAMING-NTF
@FoxGAMING-NTF 4 жыл бұрын
Hi, I'm trying to animate the weight for a TwoBoneIKConstraint, is this possible? If so, how? Thanks.
@FoxGAMING-NTF
@FoxGAMING-NTF 4 жыл бұрын
Any Ideas?
@WeLoveCreatingGames
@WeLoveCreatingGames 6 ай бұрын
Thank you so much! Helped out a lot!)
@Abhimanyukaushik18
@Abhimanyukaushik18 2 жыл бұрын
Hi my player automatically changes his position on play. It starts to float in the air but the weapon stays on ground .Any solution ?
@kieranraquel2949
@kieranraquel2949 4 жыл бұрын
Hey! TheKiwiCoder, How could I use the my created FBX file. on this tutorial, My character floats in the air while my other the character which is asset provided by unity works?
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
Compare what is different with your asset to the one that works. I’ve heard of this problem a few times but never encountered it myself sorry
@kieranraquel2949
@kieranraquel2949 4 жыл бұрын
@@TheKiwiCoder Well my file just floats in the air when put the target IK and the asset one just works fine. Oh well, I am going to stick to the one that works. Thanks for the advice and the tutorials.
@danielhasi6974
@danielhasi6974 3 жыл бұрын
I did everything how u describe it in your video but got following error: The TransformStreamHandle cannot be resolved I checked everything but cant find the solution...
@TheKiwiCoder
@TheKiwiCoder 3 жыл бұрын
Hmm that sometimes means an object bound to a constraint is outside the animator hierarchy
@viverohessmiguel9172
@viverohessmiguel9172 3 жыл бұрын
Something strange happens with the hands as they do not connect well to the point where you should grab the weapon, I tried to rotate it and everything but still there is no grip?
@Basseloob
@Basseloob 4 жыл бұрын
im trying to rotate the hands but it wont move in play mode,, Help
@aryangovil265
@aryangovil265 4 жыл бұрын
u can only rotate in scene view
@roguebiscuitmusic442
@roguebiscuitmusic442 3 жыл бұрын
@@aryangovil265 im having the save issue man it doesnt rotate if playmode is active. which is kinda making it impossible to complete this tutorial. any tips would be great
@aryangovil265
@aryangovil265 3 жыл бұрын
@@roguebiscuitmusic442 while in playmode and game is active switch to scene view and rotate the player then copy paste the values in the inspector after stopping playmode
@halbschattenmorker9487
@halbschattenmorker9487 6 ай бұрын
you sir, saved my sanity
@stinknay
@stinknay Жыл бұрын
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?
@mariestevens294
@mariestevens294 11 ай бұрын
did you ever figure out a solution??? currently experiencing the same problem
@stinknay
@stinknay 11 ай бұрын
@@mariestevens294 The short answer is no. I just loaded my project. One thing I did was tweak the angle and position of my characters arms so when he jumped he didn't have his arms at 180 degrees like a robot. So... that helped but didn't make it perfect. There is probably a trick to do it but I don't know it. It's interesting because I see ads for motion capture suits for like 4000$ and you take a video of yourself to get the proper animations. I kind of think that's probably the way that the Triple-A games do things. So... with my project the idea is to get something good enough that shows the flow of the game etc. and then if it ends up being a good game I can always fix the graphics etc. and animations later.
@sorinilie926
@sorinilie926 4 жыл бұрын
After following your tutorial, im encountering a problem. My character is floating, so my character controller collider dose not touch the ground and it registers as NotGrounded. Any ideea how i could fix this ? I see that the rigging plugin or the IK is doing this (there is a blue ball between my character's feet and the ground).
@DavidInschlag
@DavidInschlag 4 жыл бұрын
got the same issue here, as soon as I put the weapon or the ref_object in the target of RightHandIK/LeftHandIK the starts floating and the handposition is messed up
@sorinilie926
@sorinilie926 4 жыл бұрын
@@DavidInschlag for the hand position, rotate and position the target objects while playing till you are satisfied, then copy the component, stop the game, then paste the components.
@DavidInschlag
@DavidInschlag 4 жыл бұрын
@@sorinilie926 in my case it was not due to the transforms. I was using the Synty SciFi-City Pack when doing the tutorial and there were two different kind of characters. The normal ones and the FixedScaled-ones. I had to use the FixedScaled characters for this to work.
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
Yeah make sure to use the fixed scale characters. Ensure the scale on all nodes in the skeleton are 1. Does your character controller have gravity? From memory, this must be implemented manually if your not using a rigid body.
@Aytoh1
@Aytoh1 3 жыл бұрын
@@DavidInschlag im getting the same issue with the synty war pack, my soldier falls through the ground to waist level whenever the main rig builder component is active. if i untick it in the inspector my character stands correct - as soon as its on though he drops. tried using normal character and fixed scaled - any other ides?
@ChuckPalomo
@ChuckPalomo 2 жыл бұрын
How do you stop it from messing with the reload animations and the like?
@jurgenvanoorschot8467
@jurgenvanoorschot8467 4 жыл бұрын
Great Work! Very nice to follow. I am trying to work on a own character. But all the time i added two bone contrains unity generates errors, and the rigging stops working. Thus anyone have this problem also?
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
That’s weird, what kind of errors? Double check the rig builder is assigned to the same game object the animator is on
@jurgenvanoorschot8467
@jurgenvanoorschot8467 4 жыл бұрын
@@TheKiwiCoderWell a few staps I done like youre video, a controller with blendtree, character working normal, animations are looking fine. Adding a rig builder and layer in correct order, still no problem. But adding a two bone IK the following error occours: UnityEngine.Animations.TransformStreamHandle.CheckIsValidAndResolve (UnityEngine.Animations.AnimationStream& stream) (at :0) UnityEngine.Animations.TransformStreamHandle.SetLocalTRS (UnityEngine.Animations.AnimationStream stream, UnityEngine.Vector3 position, UnityEngine.Quaternion rotation, UnityEngine.Vector3 scale, System.Boolean useMask) (at :0) UnityEngine.Animations.Rigging.RigSyncSceneToStreamJob+TransformSyncer.Sync (UnityEngine.Animations.AnimationStream& stream) (at Library/PackageCache/com.unity.animation.rigging@0.2.6-preview/Runtime/AnimationJobs/RigSyncSceneToStreamJob.cs:51) UnityEngine.Animations.Rigging.RigSyncSceneToStreamJob.ProcessAnimation (UnityEngine.Animations.AnimationStream stream) (at Library/PackageCache/com.unity.animation.rigging@0.2.6-preview/Runtime/AnimationJobs/RigSyncSceneToStreamJob.cs:119) UnityEngine.Animations.ProcessAnimationJobStruct`1[T].Execute (T& data, System.IntPtr animationStreamPtr, System.IntPtr methodIndex, Unity.Jobs.LowLevel.Unsafe.JobRanges& ranges, System.Int32 jobIndex) (at :0) At this point, the animations are working normal. But the suppoosten movement is not happing. When i change the character to that one you are using its working again. This is the asset i am using : assetstore.unity.com/packages/3d/characters/robots/sci-fi-warrior-pbr-hp-polyart-106154 I cannot find anything on the error, many are mentioning that it is still preview at this stage. Maybe you had this also before.
@arturatayants1666
@arturatayants1666 4 жыл бұрын
@@jurgenvanoorschot8467 in case you haven't solved your issue with that assets - double check that there are no objects with the same name in the character's or weapon's hierarchy. I had the similar issue and found out that the root of my weapon had the exact same name as one of it's children. After renaming one of those the problem is gone:)
@oghenetegaidogun8552
@oghenetegaidogun8552 3 жыл бұрын
Please my character bends to the side anytime it moves... if possible do you have a fix for this please? Thank you
@msegamedev
@msegamedev 2 жыл бұрын
Great tutorial. Very useful. Thanks!
@Maskeowl
@Maskeowl 2 жыл бұрын
i think its bugs my gravity when i change animations sen helppleaseee
@robertli8008
@robertli8008 4 жыл бұрын
Make More Videos Please! Great Quality Content
@nastyaromanova5902
@nastyaromanova5902 4 жыл бұрын
Thank you! Everything works fine until up to the point when I put the gun into the skeleton hierarchy... Error: "avatar is invalid" (I'm using a custom made character and the built in avatar...) any Idea? Does the gun need an avatar too?
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
You’re welcome! You can pull the gun out of the skeleton hierarchy and keep it as a sibling of it instead. Then use a multi parent constraint to attach it to the skeleton. Checkout this: kzbin.info/www/bejne/l5vQoWaAbLNmhdk
@nastyaromanova5902
@nastyaromanova5902 4 жыл бұрын
@@TheKiwiCoder thank you, it works!
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
Saskia Hostni 👌🎉
@ibrahimaltaha3186
@ibrahimaltaha3186 4 жыл бұрын
there is another thing, your character will only use 1 weapon, it is kinda not possible to switch weapons...... is there a way to round around that?
@TheKiwiCoder
@TheKiwiCoder 4 жыл бұрын
It’s a bit of a process but yes it is possible. The basic idea is not to reference the weapon directly from the constraints.
@ibrahimaltaha3186
@ibrahimaltaha3186 4 жыл бұрын
@@TheKiwiCoder yup, make an empty object that act as weapon container, and IK objects that is fixed for the character itself, whenever you change the weapon, a script will simply change the position and rotation of those IK points, based on which type of weapon
PERFECT Weapon Aiming! (IK, Unity Tutorial Third Person Shooter)
13:36
Players push long pins through a cardboard box attempting to pop the balloon!
00:31
Yay😃 Let's make a Cute Handbag for me 👜 #diycrafts #shorts
00:33
LearnToon - Learn & Play
Рет қаралды 117 МЛН
Using IK to Improve Animations in Unity
12:05
Game Dev Guide
Рет қаралды 67 М.
The "Impossible Torpedo" was real
16:33
Steve Mould
Рет қаралды 117 М.
Giving Personality to Procedural Animations using Math
15:30
t3ssel8r
Рет қаралды 2,6 МЛН
Make your Characters Interactive! - Animation Rigging in Unity
16:19
Creating procedural walk movement | Prototype Series
5:50
Idle ANIMATION in UNDER 5 MINUTES!
6:09
Gogan
Рет қаралды 7 М.
Players push long pins through a cardboard box attempting to pop the balloon!
00:31