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

Поделиться
HTML-код
  • Опубликовано: 21 сен 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!

Комментарии • 617

  • @SubjektDelta
    @SubjektDelta 3 года назад +77

    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 года назад +55

    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.

  • @thecreativity5793
    @thecreativity5793 4 года назад +79

    This channel is hidden gem 👌♥️

  • @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!

  • @fuseinabowl
    @fuseinabowl 11 месяцев назад +8

    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

  • @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.

  • @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😂❤

  • @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

  • @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

  • @krooqs
    @krooqs 2 месяца назад +1

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

  • @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.

  • @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 🙌

  • @Steelersfan355
    @Steelersfan355 4 года назад +8

    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

  • @maxvargas1806
    @maxvargas1806 5 месяцев назад

    Bros phenomenal, 3 years later still great

  • @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!

  • @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.

  • @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 🤗

  • @prabhakardeep5921
    @prabhakardeep5921 4 года назад +2

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

  • @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

  • @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!

  • @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!!

  • @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

  • @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 :)

  • @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.

  • @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.

  • @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

  • @fred1541
    @fred1541 7 месяцев назад

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

  • @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 :)

  • @ryancullen7831
    @ryancullen7831 4 года назад +1

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

  • @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.

  • @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.

  • @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!

  • @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!

  • @iamthebubb
    @iamthebubb 2 года назад

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

  • @horkaichan8880
    @horkaichan8880 4 года назад +1

    This video series has been excellent ! I’d smash that like button many more times if RUclips 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 :)

  • @kayangmiji4159
    @kayangmiji4159 4 года назад +1

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

  • @小陈-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 :)

  • @coreygrace8937
    @coreygrace8937 4 года назад +1

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

  • @wp1591
    @wp1591 2 года назад

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

  • @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.

  • @joshuastewart6289
    @joshuastewart6289 3 года назад

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

  • @shanebrown2865
    @shanebrown2865 3 года назад

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

  • @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 ☺

  • @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

  • @DhayaDevan
    @DhayaDevan 3 года назад +1

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

  • @luaykashef
    @luaykashef 3 года назад

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

  • @dimanchous2300
    @dimanchous2300 2 года назад +3

    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 😥

  • @davidson2727what
    @davidson2727what 3 года назад

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

  • @castlecodersltd
    @castlecodersltd Год назад

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

  • @elektra81516
    @elektra81516 4 года назад +2

    Great tutorial, friend! Subscribed!

  • @billmolloy2264
    @billmolloy2264 3 года назад +2

    Excellent Video, many thanks

  • @drhollow_on_hogwarts8778
    @drhollow_on_hogwarts8778 3 года назад +1

    Exactly what im looking for , thanks

  • @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 🙂

  • @charakaabeywickrama8709
    @charakaabeywickrama8709 3 года назад

    This is exactly what I was looking for

  • @ohalohuntero
    @ohalohuntero 3 года назад

    Bro this series is so good thanks again

  • @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!

  • @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.

  • @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

  • @فارس-م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

  • @gamedevlol
    @gamedevlol 5 месяцев назад

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

  • @k4chanzs427
    @k4chanzs427 4 года назад +1

    Clear and Perfect.

  • @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?

  • @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!

  • @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!

  • @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.

  • @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!

  • @rufusmassey899
    @rufusmassey899 2 года назад

    Thanks so much for this, everything works

  • @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.

  • @gamedevlol
    @gamedevlol 5 месяцев назад

    Right after I add a multi-parent constraint, my character can't move
    How do I fix this?
    Also, this tutorial was great! Thank you

  • @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 :)

  • @domnicmoses7396
    @domnicmoses7396 4 года назад +2

    U earned a subscriber!! Good luck..

  • @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?

  • @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 👌🏿👌🏿💪🏿💪🏿

  • @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.

  • @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.

  •  4 года назад

    Great tutorial, thank you!

  • @lorenzesaledain5355
    @lorenzesaledain5355 2 года назад +1

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

  • @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

  • @RanathCS
    @RanathCS 3 года назад

    The Next Breckey ❤❤ nice explanation.
    Could you do "Behavior Trees for everyone" package for enemy AI please. 🙏

  • @ianrzeta5696
    @ianrzeta5696 3 года назад +3

    Bro, I have a gun instead of a rifle, problem is about the pivot I put it in the same angle as the rifle on the tutorial and well the multi aim only moves the gun and not the whole arm, how i can fix it?
    Also, thank you for this tutorials! KEEP DOING IT, MAN!

    • @neoneperful
      @neoneperful 3 года назад

      Hello. Do you solve it? I need the same help! Lol

    • @Markoolgel
      @Markoolgel 3 года назад +1

      Add a Rig Transform component to the weapon pivot, without it the Animation rigger cant update the ik setup after you hit play.

    • @hyperv4758
      @hyperv4758 3 года назад

      @@Markoolgel dude u saved my whole week thank you

  • @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

  • @bijianwu5124
    @bijianwu5124 3 года назад +1

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

  • @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?

  • @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.

  • @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!

  • @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 :)

  • @sriramsrinivasan5011
    @sriramsrinivasan5011 3 года назад +2

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

  • @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?

  • @肖德腾
    @肖德腾 Год назад +1

    why i can't find my comment,anyway.i feel confused, 09:18,we use "Multi-Parent Constraint" to controll the WeaponPivot,and then wen use "Multi-Position Constraint", which means :our model's Clavicle_R affect WeaponPose,then WeaponPose affect the WeaponPivot(the gun we are using),is that right?
    i'm confused that,my gun rotates when i look up and down,but the arms never move,they only move when i change "Multi-Position Constraint -> Settings -> Offset -> y", pls help me😂

    • @TheKiwiCoder
      @TheKiwiCoder  Год назад +1

      Hey, are your hand IK rig constraints below the others in the hierarchy? They should resolve after the pivot and and pose have been resolved.

    • @肖德腾
      @肖德腾 Год назад

      @@TheKiwiCoder hey,thank you for response,actually this is my third message😂 I have to use Vpn so I can talk to you.but it is not stable.
      I'm doing my college GraduateDesign and your videos does help me a lot, but still i have some troubles in using AnimationRiggings, so if you get some spare time,maybe you can do me a favor?
      I hope i may have your email address so i can send email but not using Vpn to talk to you.
      Just for Unity issues ,and i won't bother you after the problems solved, I promise🙏

  • @alidoost.h4182
    @alidoost.h4182 3 года назад

    Thanks for great tutorial but i have issue with multi aim constrain, It doesn't look to right direction when i try to rotate character

  • @mohokhachai
    @mohokhachai 8 месяцев назад

    The leader developer

  • @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.

  • @smabuzzaka1031
    @smabuzzaka1031 3 года назад +2

    my gun dosent look up

  • @boxlopta9800
    @boxlopta9800 4 года назад +2

    Really good clean and helpfult tutorial.
    22:53 however for some reason if I aim layer weight is set to number defined by aimDuration. (if aimDuration is 0.1 then waight is set to 0.9)
    but if I set aimDuration to 0 it aims but there is not trasition it just move to aiming position instantly.
    could you help me please? (am using unity 2019.4.1f1)