[#04] Unity Animation Rigging - Aiming a weapon using Multi Aim Constraint

แชร์
ฝัง
  • เผยแพร่เมื่อ 12 ก.ย. 2024
  • This video shows how to aim your characters weapon using the Unity animation rigging package. This tutorial follows on from two previous tutorials:
    ►Next Video: • [#05] Shooting a weapo...
    ►Previous Video: • [#03] Unity Animation ...
    Assets used in this video:
    ► Sci-Fi City Pack: assetstore.uni...
    ** Share this video **
    • [#04] Unity Animation ...
    **********************
    ** Subscribe **
    / @thekiwicoder
    ***********************
    Follow Me:
    ► / thekiwicoder
    ► / thekiwicoder
    ► / discord
    Thank you!

ความคิดเห็น • 614

  • @SubjektDelta
    @SubjektDelta 3 ปีที่แล้ว +76

    Camera updates, in this case the cinemachine blend update should ALWAYS be in LateUpdate!!! This is the only way the game will look smooth on any monitor that has a higher refresh rate than 30!
    My fix:
    Cinemachine Brain - Blend Update: Late Update (you want those smooth frame times)
    Character Animator - Update Mode: Normal
    Character Aim Script - camera yaw and rotation in Update()
    No jitter and smooth image! :)

    • @TheKiwiCoder
      @TheKiwiCoder  3 ปีที่แล้ว +10

      Yes! I had to do exactly this after I upgraded my monitors. Thank you for sharing this!

    • @dump_dude6547
      @dump_dude6547 3 ปีที่แล้ว +4

      @@TheKiwiCoder Hey, your tutorial very good but i cant understand why when i moving, the gun just dont at right it position, it rotate left or right

    • @workshopoleg5661
      @workshopoleg5661 3 ปีที่แล้ว +7

      Damn, thank you so much, my comrad. Hello from Ukraine

    • @mr_crapto
      @mr_crapto 3 ปีที่แล้ว +3

      Damn thanks man I had same problem

    • @stevenbraun918
      @stevenbraun918 3 ปีที่แล้ว +1

      @dvrk I have the same problem but sadly it didn't fix it.

  • @tubeselder
    @tubeselder 3 ปีที่แล้ว +129

    For those that are using humanoid rigs with this tutorial and wondering why your character is shooting into space - Place your WeaponPivot gameobject inside of another object. There is a known bug when constraining direct children of the Animator with the Humanoid rig. Placing it one level down fixes the issue. Hoping to save someone else 3 hours of confusion.

    • @TheKiwiCoder
      @TheKiwiCoder  3 ปีที่แล้ว +5

      Wow I wasn’t aware of this, Cheers for the heads up!

    • @binjuchenthitta2445
      @binjuchenthitta2445 3 ปีที่แล้ว +8

      I have been figuring this out for a week now....Thanks a lot dude...God bless you

    • @chaos4living676
      @chaos4living676 3 ปีที่แล้ว +3

      Man it happened to me and it was weird, like my character was getting hit by a Skyrim giant

    • @karthikeyubusa5630
      @karthikeyubusa5630 3 ปีที่แล้ว +2

      Thanks a lot, man. I have been trying many different methods to find out the problem. I wish had seen your comment earlier! By the way, how did you find out the solution?

    • @parthbarot2717
      @parthbarot2717 3 ปีที่แล้ว

      give me another solution its not work a wepon position change the position on play

  • @omareltigani7718
    @omareltigani7718 3 ปีที่แล้ว +54

    For those who can't set the pivot point properly beacuse it is always centered: make sure your are in pivot mode in the upper left corner next to the tools.

    • @kurtjenkins2646
      @kurtjenkins2646 2 ปีที่แล้ว +6

      youre a legend took me an hour to work out why that was happening :0

    • @GH0ST_O7
      @GH0ST_O7 2 ปีที่แล้ว +5

      Literally saved so much time

    • @drakenforge3798
      @drakenforge3798 ปีที่แล้ว

      Thank You

    • @skourge891
      @skourge891 ปีที่แล้ว

      Hats off

  • @thecreativity5793
    @thecreativity5793 4 ปีที่แล้ว +79

    This channel is hidden gem 👌♥️

  • @darkblade3786
    @darkblade3786 3 ปีที่แล้ว +16

    Loving the videos! definitely need them for the game im making. Found one slight error that I could not figure out for three hours so posting it here in the hopes others dont have to suffer like i did.
    If the Multi-Aim Constraint does not work for you in the Y axis and you have more options than shown at 10:07 then delete the component and use the Look At Constraint instead. It does the same job as the Multi Aim Constraint Component (when combined with the Multi-Parent Constraint) in this video

  • @RealStokez
    @RealStokez 3 ปีที่แล้ว +24

    Ok heres what ive learned from the errors i had after finishing this and how i fixed them:
    *Movement Jitter?* In your movement script, change 'void Update' to 'void FixedUpdate'.
    *Rotate Camera Jitter?* In your Main Camera > CinemachineBrain, change Blend Update Method to 'Fixed Update'
    *Cant Move Character?* Enable 'Apply Root Motion' in your Animator component.
    There's probably more but thats all i can remember lol.

    • @aciem
      @aciem 3 ปีที่แล้ว

      I still have movement jitter if cinemachine update is set to fixed. The code is also in fixedupdate. But i still have jitter movement.

    • @aciem
      @aciem 3 ปีที่แล้ว

      I found out why, if you still have nervous movement, change the animator update mode to "animate physics". This trick to get a perfect aiming is very risky, I don't like it at all. messing with the update layers is going to be a pain in a more complex game.

    • @muhammadahmadyousaf2824
      @muhammadahmadyousaf2824 3 ปีที่แล้ว

      i cannot move my character using root motion because i have made custom rigidbody controller . so can any one help in this regard?

    • @joelastorga6413
      @joelastorga6413 3 ปีที่แล้ว

      thanks!!

    • @INSTINKT51
      @INSTINKT51 3 ปีที่แล้ว

      thx!

  • @hikarisai8037
    @hikarisai8037 2 ปีที่แล้ว +12

    For those who is troubling with, when you look around the world and your gun start rotating, u just need to uncheck the unwanted axis in Multi-Aim Constrained Settings "Constrained Axis".

    • @trentwilliams7829
      @trentwilliams7829 2 ปีที่แล้ว +1

      u saved my life with that one
      Nice

    • @hunabku9615
      @hunabku9615 2 ปีที่แล้ว +2

      you saved few days of research, thansks a lot !

    • @VJoK3R
      @VJoK3R 2 ปีที่แล้ว +3

      Thank you! I had to do this for the RigLayer_WeaponAiming, unchecking the z-axis stopped the weapon from rotating.

    • @patek2385
      @patek2385 ปีที่แล้ว +1

      It's still relevant, Thanks alot

    • @DRE_WW
      @DRE_WW ปีที่แล้ว +1

      Ly man, no jokes😂❤

  • @ishaann9461
    @ishaann9461 4 ปีที่แล้ว +9

    You deserve millions of subscribers, no joke. I've been searching the internet tirelessly for something that actually teaches me something about unity and when I found your channel I almost died. This is fantastic!

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว +3

      That’s great to hear! Glad you’ve found this useful.

  • @DJLKM1
    @DJLKM1 4 ปีที่แล้ว +15

    Please keep these uploads coming, they are pure gold. A massive help to many, and with you using mostly the Synty packs really makes it a help to me as im always using them.

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว +1

      Absolutely, there will be more videos to come. The Synty packs really give you a boost to make your game look good!

    • @DJLKM1
      @DJLKM1 4 ปีที่แล้ว

      @@TheKiwiCoder Love the Synty packs as you get a whole ton of possibilities in each pack, though i have about a couple of issues with the packs. 1, The character prefabs are all in one and you can't easily seperate them. 2, all the vehicles don't have opening doors.

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว +2

      @@DJLKM1 Yes they're not without their limitations. But still seriously fun to use! I ran into the same issue with the characters... Jay has a nice step by step on how to import the fbx into blender: www.versluis.com/2020/03/using-synty-characters-with-mixamo-and-blender/
      Once imported you can remove the extraneous characters and re-export. A bit of a process the first time, but can be worth it if trying to work with Mixamo.

    • @farrukhmalik8747
      @farrukhmalik8747 4 ปีที่แล้ว

      @@TheKiwiCoder Help! multi aim constraint is only working when i am changing the AimTarget position but when i am rotating the camera(parent of AimTarget) ,multi aim constraint is not working. (i am not using cinemachine).

    • @bernardopinheiro2935
      @bernardopinheiro2935 4 ปีที่แล้ว +1

      ​ @TheKiwiCoder this is happening for me too (and i'm using cinemachine), i noticed that the transform of the aim target is not really changing (continues 0 0 20) it only changes because of the camera move but the gun just points to the transform of the point

  • @Suschoya
    @Suschoya 4 ปีที่แล้ว +4

    I... I am so thankful you came out with this. I was struggling so hard a while back. Im glad this tutorial is out here.

  • @Steelersfan355
    @Steelersfan355 4 ปีที่แล้ว +7

    its better to use spine 2&3. When you mimic aiming a gun up and down you have a small arch and flex in the middle and between you're shoulder blades while you're neck and arms rotate up and down to most. Extremely well done and well explained tutorial I've watch a lot of the animation rigging tuts and most people don't explain they go on like you should know what the heck you're doing.

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว

      Thank you, and cheers for the tip!

    • @Steelersfan355
      @Steelersfan355 4 ปีที่แล้ว +1

      @@TheKiwiCoder no problem man keep up the good work. Unfortunately my aim constraint rotates the weapon at the wrist probably due to it being a pistol so I'll probably have to dump the pivot towards the spine or I'll go the built in IK route to get the spine to bend since I'm using this as a base for fixed camera angles

  • @schooliedee
    @schooliedee 4 ปีที่แล้ว +4

    Outstanding tutorial. Hadn't heard of this package at all until a few days ago and you've spelled it out so plainly for those of us struggling with Unity's old IK system.
    Thanks for taking the time to make this video, hope this channel takes off 🙌

  • @krooqs
    @krooqs 2 หลายเดือนก่อน +1

    I'm still rewatching these tuts in 2024. Thanks for making such great vids!

  • @fuseinabowl
    @fuseinabowl 10 หลายเดือนก่อน +7

    If anyone is using this tutorial as a starting point for other locomotion systems you might run into an issue where the player stops moving after you add the Multi-Parent Constraint. I ran into this too and fixed it (other locomotion systems = not root motion - I'm using physics, saw someone else in the comments was using nav agents)
    In the CharacterLocomotion script, add an empty method:
    void OnAnimatorMove() {}
    It seems that adding the Multi-Parent Constraint forces the Animator to half-use root motion, overruling any external motion by just anchoring the player to the spot. Adding OnAnimatorMove() to any component on the Animator object overrules that and allows you to use your existing movement system.

    • @Ranger8744
      @Ranger8744 9 หลายเดือนก่อน +2

      OMG I was all over the place I even when back and set up everything from scratch🤣 Thanks a ton!

    • @fuseinabowl
      @fuseinabowl 9 หลายเดือนก่อน +1

      @@Ranger8744 no worries :)

    • @MiikaLiukka
      @MiikaLiukka 8 หลายเดือนก่อน +1

      Thanks, came in the comments to look for a solution and this saved me a ton of frustration and debugging!

    • @gamedevlol
      @gamedevlol 5 หลายเดือนก่อน

      By CharacterLocomotion do you mean the script that handles movement? Or is this a specific Unity script?

    • @fuseinabowl
      @fuseinabowl 5 หลายเดือนก่อน

      @@gamedevlol The script that KiwiCoder is writing in this tutorial is called CharacterLocomotion

  • @albertvaldes6689
    @albertvaldes6689 ปีที่แล้ว +3

    At 7:23 I had an issue where setting the transform rotation values to 0 for the WeaponPose under the RigLayer_WeaponAiming object would not change the rotation of my gun at all. I later realized that the constraints were not taking effect because I first needed to update them to work with the WeaponPose from the RigLayer_WeaponAiming and not the WeaponPose from the RigLayer_WeapingPose. I'm using a humanoid character with a rigidbody btw
    Hope that helps someone. I really appreciate this channel for these amazing videos!

  • @bxbvxbv
    @bxbvxbv 4 ปีที่แล้ว +4

    this is exactly what i was looking for 😍. been banging head for 3 days not sure where to look for better info on how to do this, but you just came right in time with the tutorial ❤. thank you soooo much bro 🤗, looking forward to upcoming awesome videos! 😄

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว +1

      That’s great to hear! Good luck with your game bro 🤗

    • @bxbvxbv
      @bxbvxbv 4 ปีที่แล้ว

      @@TheKiwiCoder 🤗

  • @Tharindu87
    @Tharindu87 3 ปีที่แล้ว +7

    @TheKiwiCoder Your channel is an absolute hidden gem. Super relevant to the current packages in Unity. I am a professional C# dev and even I sometimes find it annoyingly overwhelming trying to make changes to controllers, but am too lazy to write my own, especially because I know Unity has some existing solutions and these will be supported and looked after to a much better degree than a third party asset will be one day. Your series here is really helping me evaluate what I need to write and what I don't need to write, what looks good and what doesn't look good. Thank you so much for this.

    • @TheKiwiCoder
      @TheKiwiCoder  3 ปีที่แล้ว +2

      No problem, and thanks for the kind words :) A character controller can be a lot of work but it’s a really good exercise too. I found it’s not so daunting after spending a few hours on it.

  • @prabhakardeep5921
    @prabhakardeep5921 4 ปีที่แล้ว +2

    I have found a hidden gem.
    Great videos so far, I've been following all tutorials. Please keep uploading.

  • @omgarnie
    @omgarnie 3 ปีที่แล้ว +1

    idk why it took me this long to find this gem...thanks so much bro animation rigging has saved me a ton

    • @TheKiwiCoder
      @TheKiwiCoder  3 ปีที่แล้ว +1

      No problem, glad I could help!

  • @maxvargas1806
    @maxvargas1806 4 หลายเดือนก่อน

    Bros phenomenal, 3 years later still great

  • @0serchlP
    @0serchlP 4 ปีที่แล้ว +5

    I can not thank you enough, thanks to you I was able to make another devlog

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว +2

      Nice! I’d love to see it. Post a link to it in discord 🙂

    • @0serchlP
      @0serchlP 4 ปีที่แล้ว

      @@TheKiwiCoder It is in struct-your-stuff :)

  • @zombievirals
    @zombievirals 4 ปีที่แล้ว +1

    This is going to be really nice to apply to projectile firing enemies in games as well, I'm falling in love with Animation Rigging for sure!!

  • @trianguc8319
    @trianguc8319 ปีที่แล้ว

    even though I switched to UE5, I still appreciate what he'd done, some of the first must follow tutorials to get your first steps into the game industry

  • @shyamarama
    @shyamarama 4 ปีที่แล้ว +3

    Thanks so much for making these! 🙏 You’re one of the best to cover the new animation rigging

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว +1

      Thanks! I love the new rigging package too. It’s a great kickstart when you’re short on animations.

  • @adamharris2325
    @adamharris2325 3 ปีที่แล้ว +1

    Massive thank you for these videos, I am much more of a programmer rather than animator so these videos are massively helpful to me

  • @ryancullen7831
    @ryancullen7831 4 ปีที่แล้ว +1

    You are amazing at explaining and your voice is so soothing! love these tutorials keep up the good work mate

  • @THETV1RUS
    @THETV1RUS 4 ปีที่แล้ว +2

    Thank you so much for this! I couldn't figure out how to adjust my rigs with code and this tutorial showed me how to.

  • @erz3030
    @erz3030 3 ปีที่แล้ว

    This is such a solid tutorial, holy cow! You cover so much. It seems like you've been doing this for a while.

    • @TheKiwiCoder
      @TheKiwiCoder  3 ปีที่แล้ว +1

      Thanks for the kind words! I’m a bit obsessed with Unity 😅

  • @adeveloper7184
    @adeveloper7184 4 ปีที่แล้ว +2

    Man! Awesome, keep this coming, switching weapons system, vaulting, layers of animations gonna be fun, pistol having different animation, weapon holder. Ahh there is lotta thing ;) you know, just keep this coming..m

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว +1

      Absolutely! More videos on their way :)

    • @adeveloper7184
      @adeveloper7184 4 ปีที่แล้ว

      @@TheKiwiCoder I forgot to click the bell icon, now full prepared, waiting for more videos, keep them coming..m

  • @NoStupidItsManbearpig
    @NoStupidItsManbearpig 3 ปีที่แล้ว +1

    Great tutorial and great to see it using the animation rigging package. Such a power set of tools. Cant wait to do the other tutorials. Thanks :)

  • @workshopoleg5661
    @workshopoleg5661 3 ปีที่แล้ว

    I really like your tutorials, I leave comment once in a lue moon, but you will be an exception, you deserve that. I'll leave them during whole course.

  • @workshopoleg5661
    @workshopoleg5661 3 ปีที่แล้ว +4

    If you guys have problems with Weapon Pivot, make shure your pivot is not a center, but exactly a pivot. You can check it at the top bar, since you selected any object in scene

    • @davidson2727what
      @davidson2727what 3 ปีที่แล้ว

      Please explain this more. When I make the weapon of the pivot the pivot object takes on the transform of the child weapon. Is this what you are talking about?

    • @workshopoleg5661
      @workshopoleg5661 3 ปีที่แล้ว

      @@davidson2727what No, there is option in Unities interface, to change kind of pivot "center/pivot"

    • @workshopoleg5661
      @workshopoleg5661 3 ปีที่แล้ว

      @@davidson2727what You can text me on discord. Find VaultPunk user on KiwiCoder channel

  • @hazen7645
    @hazen7645 ปีที่แล้ว +3

    Be sure to reset the transform on RigLayer_WeaponPose and RigLayer_HandIK. I had some weird results going on, like the gun hanging up in the air. And you guys shouldn't have to rework the tutorial to make it work for you. You should be resetting the position on all your IK objects when using the Animation Rigging tools.

  • @horkaichan8880
    @horkaichan8880 4 ปีที่แล้ว +1

    This video series has been excellent ! I’d smash that like button many more times if TH-cam allowed it.
    I did run up to interesting problem by the end of the video when trying to fix the aim lag / jitter by switching Cine machine update to Fixed update. This solved the aiming but now my character movement becomes laggy and jittery. I am guessing this has to do with me using character controller for movement instead of root motion. In any case, conventional wisdom is to have the camera update as late as possible to ensure all movements are resolved before rendering, so it’s a little counter intuitive that updating the camera first solved jittery aiming, at the same it it makes sense that it would introduce jitter in my character movement.

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว +1

      Thanks, glad you are enjoying the videos! The reason for using fixed update is because the lookattarget is referenced by the constraints which needs to be updated before the animator is run. What I would try is: update the character controller first (fixed update), then cinemachine, then run the animator. You could try calling Update() manually on the animator/cinemachine to have control over the timing, or try using script priorities. If you find a solution let me know!

    • @horkaichan8880
      @horkaichan8880 4 ปีที่แล้ว +2

      TheKiwiCoder I “hacked” it by making a object that mirro the camera position and rotation by script in the update call then attach a child object with offset of 20 on Z. Then I make my rig aim at this child object instead. It’s still lag the crosshairs but the motion is smooth so I pass it off as a feature :)

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว

      Hor Kai Chan haha, cool nice work around :)

  • @coreygrace8937
    @coreygrace8937 4 ปีที่แล้ว +1

    aye i dont normally comment but this tutorial playlist has been amazing keep it homie!

  • @sirzirkidevsalot
    @sirzirkidevsalot 2 ปีที่แล้ว

    Awesome tutorial! Thanks so much for sharing your knowledge! Im still learning a lot but you have really nice and clearly showed how to work with the Animation Rigging package! Definitely one of the best tuts on this subject! Awesome!

  • @fred1541
    @fred1541 6 หลายเดือนก่อน

    That's good, I think sometimes Animation Rigging really takes patience and frustrates designer
    Thanks for your video

  • @kayangmiji4159
    @kayangmiji4159 4 ปีที่แล้ว +1

    Thank you so much no one ever upload this type of video you such a great knowledge..thanks

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว

      Thank you, you’re welcome!

  • @iamthebubb
    @iamthebubb ปีที่แล้ว

    Thank you so much, you have no idea how many days I was trying to find this solution!

  • @小陈-k9c
    @小陈-k9c 4 ปีที่แล้ว +1

    Please keep uploading , your video really inspired me a lot! I was consider to use final IK at the time , but know I thing the buildin package is a better choice.

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว

      Thanks 🙏 there will be more videos to come :) FinalIK is a great package and can save a lot of time. The animation rigging package lets you experiment quickly using multi-constraints, and then provides a path forward to create a single, optimised custom constraint, specific to your needs. All the constraint source code is available in the package too :)

  • @keldencowan
    @keldencowan 2 ปีที่แล้ว +4

    If your aim constraint isn't working, make sure you have a "Rig Transform" component on any *parent* objects such as cameras or other objects that rotate with camera view.

    • @Акіро
      @Акіро ปีที่แล้ว +1

      Thank you very much .

    • @castlecodersltd
      @castlecodersltd 11 หลายเดือนก่อน

      Pure gold, thank you very much. It's interesting that his Camera doesn't have that Component but mine needs it ☺

  • @marekpuchon4878
    @marekpuchon4878 ปีที่แล้ว

    Man this is really hide gem of those kind of tutorials!!!! Really i have made 4 different but this is easier and with super options. Really thank you, save my game!

  • @dimanchous2300
    @dimanchous2300 2 ปีที่แล้ว +2

    Can anyone help me please? My weapon jitters a lot, not camera, not character just the weapon when rotating

    • @arkinaye8598
      @arkinaye8598 ปีที่แล้ว

      It must have been a long time, but do you remember how you fixed this problem?

    • @simonbahamonde7370
      @simonbahamonde7370 ปีที่แล้ว

      I have the same issue, don't know how to fix it yet. It's also connected to the order of animations update, if you the camera updates to fixed update the weapon stops jittering, but everything else breaks 😥

  • @DhayaDevan
    @DhayaDevan 3 ปีที่แล้ว +1

    You are doing a great job bro thanks for the tutorial keep up the good work

  • @shanebrown2865
    @shanebrown2865 3 ปีที่แล้ว

    I really like how you teach, one of the best so far

  • @nickf9024
    @nickf9024 3 ปีที่แล้ว +2

    Hi, just wanted to say thanks!!! Excellent tutorial I got my guy all rigged up. After this, I consolidated everything to one "gun aiming forward" rig, where I had all the child game objects/ components inside it. so head aim and body rotating and stuff are still separate but inside one rig for that one "gun mode" i'm not sure if that's weird or will become a problem in the future, this is my first rigging.
    I also need a set of body constraints fully different for a "running backwards" rig. so far this seems like a decent way to organize it with only these few Main "rigs" containing the separate components inside, rather than all the movements on their own rigs.
    Also As someone else pointed out, im using a mixamo character and my gun would slowly rotate around the Z axis.
    this fixed it on guns multi aim contraint uncheck Settings -> Constrained Axes -> z

    • @TheKiwiCoder
      @TheKiwiCoder  3 ปีที่แล้ว

      It’s a great idea. The less objects the better :)

    • @reye7488
      @reye7488 ปีที่แล้ว

      HOLY SHIT THANK YOU SO MUCH MY ARMS WOULDNT MOVE MAKING IT LOOK SO UNNATURAL

    • @adamcookie26
      @adamcookie26 7 หลายเดือนก่อน

      @@reye7488 Hey I know it's been a year but you said it fixed your arms as they didn't move? How did you do it, I'm trying to do this with a pistol but it is only aiming the gun and not the arms with it

  • @bebopobama4686
    @bebopobama4686 4 ปีที่แล้ว +1

    Thanks I really needed this! Super underrated tutorial

  • @BloodClaymore
    @BloodClaymore 4 ปีที่แล้ว +1

    Epic. This is what I have been looking for. Great tutorial.

  • @wp1591
    @wp1591 2 ปีที่แล้ว

    THX for this great tutorial!! Helped me a lot getting some basic thoughts clear about Unity's Animation Rigging

  • @McPatoo
    @McPatoo 8 หลายเดือนก่อน +1

    In my case, my character rotates its chest so the gun seems static when moving (left or right). So, I added a 'Multi-Rotation Constraint' to the Gun Pose(like in the video). where the constrained and source objects are configured the same as in a 'Multi-Position Constraint' (offset dependes on you) :v if there's another way more effective, pls tell me.

  • @joshuastewart6289
    @joshuastewart6289 3 ปีที่แล้ว

    Ive been trying to figure out how to do this for weeks now. Thanks KiwiCoder!

    • @TheKiwiCoder
      @TheKiwiCoder  3 ปีที่แล้ว

      You’re welcome Joshua!

  • @فارس-م9ش
    @فارس-م9ش 3 ปีที่แล้ว +4

    I've a small issue with "Multi-Parent Constraints", whenever I add it to the weaponPose gameobject, the player is not moving anymore. I'm using character controller, any idea?

    • @blue_phoenix7488
      @blue_phoenix7488 2 ปีที่แล้ว +3

      Same issue.. 😔

    • @sagarhinsu
      @sagarhinsu 2 ปีที่แล้ว

      I was also facing the same issue.
      Apply Root Motion to Animator and increase the Walk and Run speed by 10 times.
      This should fix your issue

  • @smabuzzaka1031
    @smabuzzaka1031 3 ปีที่แล้ว +2

    my gun dosent look up

  • @benholicek8274
    @benholicek8274 4 ปีที่แล้ว +10

    For some reason when I'm looking around, the gun will rotate slowly around the Z axis. Not sure how to fix it.

    • @ItsYourBoPhase
      @ItsYourBoPhase 4 ปีที่แล้ว +1

      I'm Having the same issue not sure why.

    • @kentube617
      @kentube617 4 ปีที่แล้ว +5

      same problem , when Multi-Aim Constraint attached.
      Try uncheck Settings -> Constrained Axes -> z
      Not sure the reason but my problem solved.

    • @sowtank9114
      @sowtank9114 3 ปีที่แล้ว

      check if the bool mantain position offset is checked

    • @denyhax
      @denyhax 3 ปีที่แล้ว

      @@kentube617 saved the day

  • @elektra81516
    @elektra81516 4 ปีที่แล้ว +2

    Great tutorial, friend! Subscribed!

  • @mohammedumer9587
    @mohammedumer9587 4 ปีที่แล้ว +2

    u earn my respect and thus a new sub....good one brother

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว +1

      Thank you, much appreciated!

    • @mohammedumer9587
      @mohammedumer9587 4 ปีที่แล้ว +2

      @@TheKiwiCoder bro just a Lil suggestion...how about you edit the titles of these video to part-1,2,3 and so on and add a playlist as a third-person shooter in your channel..it would be easier to follow up and share the playlist too.
      because I sorted em out by the date these videos were uploaded..would be easier if you would do that

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว +2

      mohammed umer thanks man, it’s a good idea. I’ve been thinking about that too but been too lazy to do it haha. I’ll get onto it, cheers!

  • @sshhiittoo2
    @sshhiittoo2 3 ปีที่แล้ว +8

    When I add the Multi-Position Constraint to the Weapon Pose, it remains static in the scene and does not follow the movement of the character, how can I solve this?

  • @billmolloy2264
    @billmolloy2264 3 ปีที่แล้ว +2

    Excellent Video, many thanks

  • @davidson2727what
    @davidson2727what 3 ปีที่แล้ว

    Saving me so much time with animation! Thanks for this video friend!!

  • @emiljefsen8477
    @emiljefsen8477 4 ปีที่แล้ว +11

    Hey, im loving the tutorials, but for some reason when adding the MultiAimConstraint and MultiPositionConstraint, my player will just get stuck midair and isn't moveable. I am using a rigidbody controller, any help would be greatly appreciated :)

    • @bernie_san7964
      @bernie_san7964 3 ปีที่แล้ว +1

      Damn, I'm stuck too

    • @christianbadenhausen7059
      @christianbadenhausen7059 3 ปีที่แล้ว +7

      You need to use apply root motion

    • @blue_phoenix7488
      @blue_phoenix7488 2 ปีที่แล้ว

      Same...

    • @blue_phoenix7488
      @blue_phoenix7488 2 ปีที่แล้ว +2

      @@christianbadenhausen7059 I tried but the movement is soo jaggy...

    • @FoibsxD
      @FoibsxD 2 ปีที่แล้ว

      @@christianbadenhausen7059 thank youuuuuuuuu

  • @castlecodersltd
    @castlecodersltd ปีที่แล้ว

    Another great tutorial. This has really helped me today. Thank you ☺

  • @luaykashef
    @luaykashef 3 ปีที่แล้ว

    Thank you sooo much for this literally the best tutorial I've found out there!!

  • @ohalohuntero
    @ohalohuntero 3 ปีที่แล้ว

    Bro this series is so good thanks again

  • @drhollow_on_hogwarts8778
    @drhollow_on_hogwarts8778 3 ปีที่แล้ว +1

    Exactly what im looking for , thanks

  • @jamesalbus7991
    @jamesalbus7991 4 ปีที่แล้ว +1

    hey man, cool vid, thanks! I (and so many others it seems) needed this vid, and it did not disappoint!
    so again, thanks, and have a good one!
    also, greetings from a fellow kiwi ;D

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว +1

      Thanks man! It’s great so many have found it useful. Enjoy mate! 🥝🇳🇿

    • @jamesalbus7991
      @jamesalbus7991 4 ปีที่แล้ว

      @@TheKiwiCoder thanks, I wish you the best for your future!

  • @charakaabeywickrama8709
    @charakaabeywickrama8709 3 ปีที่แล้ว

    This is exactly what I was looking for

  • @wizardjo
    @wizardjo 3 ปีที่แล้ว

    Thank you! Amazing information in this channel. Greetings from Medellín, Colombia.

    • @TheKiwiCoder
      @TheKiwiCoder  3 ปีที่แล้ว

      Thank you! Glad you’re enjoying the channel 🙂

  • @lorenzesaledain5355
    @lorenzesaledain5355 2 ปีที่แล้ว +1

    why is my character been stuck if i add the weapon pose?

  • @domnicmoses7396
    @domnicmoses7396 4 ปีที่แล้ว +2

    U earned a subscriber!! Good luck..

  • @happyaquariums
    @happyaquariums 4 ปีที่แล้ว +1

    great video man 👌

  • @Nikdeckreviews
    @Nikdeckreviews 2 ปีที่แล้ว +2

    Hello TheKiwiCoder. Thank you very much for this great video. I am having problem at 20:52 where using UnityEngine.Animations.Rigging namespace is written. i am not able to use rigging word. its showing red lines over it. i have updated my animations rigging package too, but still facing same problem. can you please help me.

    • @valeriopatricolo1597
      @valeriopatricolo1597 2 ปีที่แล้ว

      Same with Unity 2020.3.25f1

    • @Nikdeckreviews
      @Nikdeckreviews 2 ปีที่แล้ว

      @@valeriopatricolo1597 I forgot to put "s" in animation . It's animations . Silly stuff done by me 😂

    • @jo0h4n18
      @jo0h4n18 2 ปีที่แล้ว

      @@valeriopatricolo1597 I had the same issue. Updated everything and no change. Then I look at the project which the CharacterAim.cs refers to and looked at References. There I saw Unity.Animations.Rigging. I removed it and added it as a reference again. Solved it for me

    • @itsrashid9760
      @itsrashid9760 2 ปีที่แล้ว

      @@Nikdeckreviews still not working ...anyone help me

    • @Nikdeckreviews
      @Nikdeckreviews 2 ปีที่แล้ว

      @@itsrashid9760 for me i kept animation not animations. just check spelling again.

  • @learngamedev8858
    @learngamedev8858 4 ปีที่แล้ว +1

    You are awesome please make more component like climbing ladder, swim and porker

  • @mrm0wer966
    @mrm0wer966 3 ปีที่แล้ว +1

    Ur a legend bro! Thanks so much!

  • @jo0h4n18
    @jo0h4n18 2 ปีที่แล้ว +1

    Was so stuck on the whole pivot thing around 2:30. The solution was to change "Toggle Tool Handle Position" to "Pivot". I had it set on Center. Imagine the confusion

    • @chilla124
      @chilla124 2 ปีที่แล้ว +1

      Thank you so much for this, I was fiddling around with it trying to figure out why it always snapped back to the center of my gun. I appreciate the tip!

  • @k4chanzs427
    @k4chanzs427 4 ปีที่แล้ว +1

    Clear and Perfect.

  • @bijianwu5124
    @bijianwu5124 3 ปีที่แล้ว +1

    There is no blender update with version 2.3.4 Cinemachine? which one should I change?

  • @gamedevlol
    @gamedevlol 5 หลายเดือนก่อน

    The original animation is being added to the 2 Bone IK constraint

  • @Serpent.Xenospire
    @Serpent.Xenospire ปีที่แล้ว

    Subscribed dear. You deserve more

  • @danthonyhill9906
    @danthonyhill9906 4 ปีที่แล้ว +2

    This is great can you do a tutorial series using animation rigging to shoot enemies. For Example zombies and create a wave system ?
    Overal this was pretty good i used with playmaker and worked like a charm lol with no coding.

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว +4

      Haha that sounds like a fun series. I love the no-code solutions too, it felt weird at the end when I had to open the code editor :|

    • @danthonyhill9906
      @danthonyhill9906 4 ปีที่แล้ว +1

      TheKiwiCoder LoL very fun series word lol but Na I mean sometimes u just got to it’s like really not a way not to open it if you want it to look official lol like i can’t see it not happening lol but keep doing your thing man awesome content you provided for your videos I’m definitely sharing 👌🏿👌🏿💪🏿💪🏿

  • @iamchef8544
    @iamchef8544 4 ปีที่แล้ว +4

    Why does weapon pivot change positions when I turn it into the parent

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว

      Maybe you have scale set somewhere? It’s fine, just reset the transforms and position again.

    • @marcmuniz2119
      @marcmuniz2119 4 ปีที่แล้ว +6

      You might have 'Toggle Tool Handle Position' set to center and not pivot. Right under component and animation rigging dropdown at the top of unity.

    • @emiljefsen8477
      @emiljefsen8477 4 ปีที่แล้ว

      @@marcmuniz2119 Thanks!

    • @sandroalexormeno
      @sandroalexormeno 4 ปีที่แล้ว

      ​@@marcmuniz2119 how can i do that???

    • @davidson2727what
      @davidson2727what 3 ปีที่แล้ว

      @@marcmuniz2119 Using unity 2020.3 I don't see the toggle tool handle position option in the menu. Has it been changed to something else?

  • @rufusmassey899
    @rufusmassey899 2 ปีที่แล้ว

    Thanks so much for this, everything works

  • @sriramsrinivasan5011
    @sriramsrinivasan5011 3 ปีที่แล้ว +2

    Help! Cannot find any option called blend method in cinemachinebrain.

  • @ishmhorastudios3300
    @ishmhorastudios3300 4 ปีที่แล้ว

    These are awesome videos! Can you do some videos of interacting with objects in the world? Like opening doors or picking something up with the Synty assets?

  • @adarshkaran6611
    @adarshkaran6611 4 ปีที่แล้ว +2

    At 4:23, once use the multi parent constraint i am unable to move the character without using root motion(because i find it easier to control the player without root motion)...is there a workaround for this problem ? please help me out

    • @adarshkaran6611
      @adarshkaran6611 4 ปีที่แล้ว

      i solved it finally!!yay!! rewatched the video so many times...wish i could smash the like button more number of times:)

    • @muhammadakbarrafi5199
      @muhammadakbarrafi5199 3 ปีที่แล้ว +1

      @@adarshkaran6611 how did you solved it??

  • @gammajiwa2419
    @gammajiwa2419 3 ปีที่แล้ว +2

    Why i can't move?? when I use multi parent constraints
    help me pls.

    • @andresnavesmauri552
      @andresnavesmauri552 3 ปีที่แล้ว +4

      What worked for me was applying the root motion which i had deactivated

    • @RealStokez
      @RealStokez 3 ปีที่แล้ว

      @@andresnavesmauri552 You are absolutely correct. My gun was aiming up and down, but my character couldnt turn left right, or move in any direction

  • @drr1867
    @drr1867 4 ปีที่แล้ว +2

    Hi KiwiCoder. Any idea how I can get this working without root motion? I have my player running around fine - with handIK working so holding gun fine. But as soon as I add the Multi-Parent constraint part my player transform moves to 0,0,0 position and all movement stops - running animation works on the spot. When I remove the WeaponPose multi-parent constraint it's fine and back to normal. Help please.

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว

      Are you overriding OnAnimatorMove?

    • @drr1867
      @drr1867 4 ปีที่แล้ว

      @@TheKiwiCoder no I'm not - could it be a bug with Animation Rigging? Have you ever used it without root motion?

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว

      Dr R only for really simple tests.. I turned root motion on and then override OnAnimatorMove so I could still have control. Seemed ok. Check you don’t have any crazy offsets or scale maybe?

    • @Swooplezz
      @Swooplezz 4 ปีที่แล้ว

      @@TheKiwiCoder how do i do that pls??

    • @nadunliyanage1596
      @nadunliyanage1596 3 ปีที่แล้ว

      Same issue, were you able to get this fixed?

  • @BigSquidable
    @BigSquidable 2 ปีที่แล้ว +1

    If Multi-Aim constraints results in some weird sideways aiming, I was able to fix by changing World Up Type in Multi-Aim Constraint under the Aiming Weapon Pose to Scene Up

    • @george-thomasbeazley622
      @george-thomasbeazley622 2 ปีที่แล้ว

      Im actually have this problem where if keep aiming in circles my gun spins around. Was this a similar problem? I also can't find that variable you mentioned, "World Up Type" under the multi aim constraint component

    • @CaptainInsano420
      @CaptainInsano420 2 ปีที่แล้ว

      @@george-thomasbeazley622 you find any fix to that, i have the same problem

    • @george-thomasbeazley622
      @george-thomasbeazley622 2 ปีที่แล้ว

      @@CaptainInsano420 RigLayer_WeaponAim->WeaponPose->Multi-Aim Constraint Component->Settings->Constrained Axes
      I Unchecked the Z Axes.
      @Mridul Rajbhar 's comment from 2 Months ago.

  • @josh-timallen1115
    @josh-timallen1115 3 ปีที่แล้ว

    Thank you so much.
    At first it felt intimidating to watch because it looked like a lot to set up but its actually simple and now I fully understand how to aim in third person and can move on to creating my own aiming system.
    Thank you so much XD.

  • @vaibhavjaiswal799
    @vaibhavjaiswal799 2 ปีที่แล้ว +1

    Hey man, i don't know if you look at this or not but if you see this plz help me out
    I am following your tutorial for making third person shooter ik system but i am getting issues with animation rigging
    I am stuck at this for a week
    That multi-parent constraint is making my player stuck at its position
    Or move very slowly by checking 'apply root motion'
    I am using latest unity third person controller as a base
    Unity's default animation and mixamo in place animation
    Please help me out
    Its really driving me crazy

  • @PabloTheDolphin
    @PabloTheDolphin 4 ปีที่แล้ว +4

    Hi everything went well for me except that my gun's Z rotation very slowly turns positively or negatively as I rotate my camera which twists the overall result. It still aims in the correct direction but it's rolled in some random directions as I continue to play. I pinned down the issue to the multi aim constraint component because the error disappears when i turn its weight to zero. This happens on animation rigging 0.2.6 (the version in your video) as well as 0.3.2 and 0.3.3. Any ideas what's going wrong? At the moment I have to attach a script to the weapon pose object with the aim constraint and constantly set the z rotation to 0 on update.

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว +3

      Yes, try unchecking the 'z' axis on the Multi-Aim constraint inside the AimWeapon layer. The tutorials after this one re-structure this quite a bit too.. and I haven't seen that issue since.

    • @sparklemouse5117
      @sparklemouse5117 4 ปีที่แล้ว

      @@TheKiwiCoder I don't see any way to uncheck the 'z' (or any other) axis. It looks like there has to be one axis active.

  • @DanieleSichetti
    @DanieleSichetti 4 ปีที่แล้ว +2

    Really wonderfull tutorial, clean and simple. Thank you. I have one question for the Aiming Rig: If I put the AimLookAt Target outside the character's transform (where the Animator is) I get a warning message "Could not resolve RigLayer because is not a child Transform in the Animator hierarchy" .. but if I put the LookAt target under the character's transform it will follow the player... it doesn't make sense.. Have you encounter this problem?

    • @TheKiwiCoder
      @TheKiwiCoder  4 ปีที่แล้ว +1

      Thank you! I haven’t seen that, what versions are you using? You could try this fix: put the aim lookat object inside the hierarchy, and attach a regular script to it and sync it to the position of the lookat or camera outside the hierarchy

    • @DanieleSichetti
      @DanieleSichetti 4 ปีที่แล้ว

      I'm using Unity 2019.2.11f1, I will try this fix. Thank you and keep doing this amazing tutorials!

    • @DanieleSichetti
      @DanieleSichetti 4 ปีที่แล้ว

      it was that easy.. the fix worked. Thank you again :)

  • @devchicken1482
    @devchicken1482 3 ปีที่แล้ว +3

    awesome toutorials but is anyone elses weapon flying in the air a long way away from the player anyone got a fix for this

  • @xdplai3190
    @xdplai3190 4 ปีที่แล้ว +3

    For some reason my player's scale becomes very big when i constrained the weaponpivot to the weaponpose

    • @saaddev7160
      @saaddev7160 4 ปีที่แล้ว

      same issue here

    • @nadunliyanage1596
      @nadunliyanage1596 3 ปีที่แล้ว

      Im having a similar issue that my player is initially rendered at a far different location (I havent added any dynamic spawning or anything). Were you able to get your issue fixed?

  •  4 ปีที่แล้ว

    Great tutorial, thank you!

  • @shelllly1
    @shelllly1 2 ปีที่แล้ว

    YOU ARE THE BEST !!!! :) THANK YOU !!

  • @kamolzaaliite
    @kamolzaaliite 2 หลายเดือนก่อน

    I was following these tutorial videos like a year ago, but lost all the files due to hard drive wipe, now I'm redoing everything and there is an issue where gun rotates around the pivot point when aiming up and down couple of times, don't know how to fix this.

  • @sere789654
    @sere789654 2 ปีที่แล้ว +1

    I am having problems with centering the weapon aim cube to the center. It is off by just a little but outside the target. The only thing I could find to get it directly on target is to reduce the z value of AimLookAt closer. I've tried offseting in the AimingRigLayer it but it gets weird in updating. Great tutorials!

    • @develion97
      @develion97 2 ปีที่แล้ว

      I get this issue as well.

  • @GD-oh4pe
    @GD-oh4pe 3 ปีที่แล้ว +1

    So good
    Like, so good.

  • @billy_avila
    @billy_avila 4 ปีที่แล้ว +1

    Great video

  • @As4r
    @As4r 3 ปีที่แล้ว +2

    When i use Multi-Position Constraint my weapon goes out of the hand and flies away of the character during other animations. Even after Adjusting the Offsets that were really off.

    • @As4r
      @As4r 3 ปีที่แล้ว

      When i first use the Multi-Parent Constraint my weapon goes really far away and need some adjusts too.

    • @martinvivanco9283
      @martinvivanco9283 3 ปีที่แล้ว +4

      @@As4r I had the same problem and I solved it by leaving my character's scale at 1 (before I had it at 1.6)

    • @cornchowder_channel
      @cornchowder_channel 3 ปีที่แล้ว +1

      @@martinvivanco9283 thank you Martin!