Guys, for those who have problem that after taking new weapon, your current weapon doesn't holster, you can add this line before do while in HolsterWeapon method: yield return new WaitForSeconds(0.1f); It will look like that: rigController.SetBool("holster_weapon", true); yield return new WaitForSeconds(0.1f); do { yield return new WaitForEndOfFrame(); } while (rigController.GetCurrentAnimatorStateInfo(0).normalizedTime < 1.0f); Explanation: I found this by spectating the rig animator while playing, sometimes the "holster_weapon" bool worked fine, but usually it triggered for a milisecond and because of that animation coudn't play. This line adds a little delay before the animation to let it play. Hope saved a few hours for someone.
ONLY OPEN WHEN YOU HAVE WATCHED THE WHOLE VIDEO!!! . . . to spice up the bullet bouncing and actually make it into "real" ricochet try this: //(necessary variables) [Range(0f, 1f)] public float ricochetChance; public float minRicochetAngle; if (bullet.bounce > 0) { // calculate the bullet angle from the normal it hit var bulletAngle = Vector3.Angle(hitInfo.normal, -ray.direction); if (bulletAngle > minRicochetAngle) { if (Random.value < ricochetChance) { bullet.time = 0f; bullet.initialPosition = hitInfo.point; // maybe add some randomness on the reflect for some more realistic ricochet behaviour bullet.initialVelocity = Vector3.Reflect(bullet.initialVelocity, hitInfo.normal); bullet.bounce--; } } }
Had an issue where a holstered weapon was moving with the Weapon Aim, So I keyed that off like you've done for items, and then I added a source object on the position constraint to the hip bone and now it works well. 8) Excellent tutorials BTW, really well done.
Quick Fix: If your weapon is snapping into the holstered position and then it is equipping the new weapon it is because your animation transitions have a gap and therefore it exits the "do" loop instantly. Solution: 1. Go to your Rig Controller and click on one of the Animation Transitions (between Equip and Holster) 2. In your inspector click the "Settings" dropdown. This should open up a menu panel. 3. Set Exit Time, Transition Duration, and Transition Offset to 0. If you cannot change Exit Time. Click "Has Exit Time" then set it to 0 and then Unclick "Has Exit Time". 4. Replicate/Do this for the rest of your transitions That should Fix it
@@gabz240024 Yes of course. There is a cheeky way of doing it. Before you set the trigger/bool to holster the weapon. You can play the weapon's animation forcefully. This will stop it from skipping the animation. Basically, when it enters the loop there is some delay in the animator that doesn't play the animation instantly so it just exits the loop. Here is a snippet of what it would look like. var weapon = GetWeapon(index); if (weapon) { rigController.Play("holster_" + weapon.WeaponSlot); -----> Add this line. Change the animation to something like holster_Rifle or holster_Pistol rigController.SetBool("holster_weapon", true); do { yield return new WaitForEndOfFrame(); } while (rigController.GetCurrentAnimatorStateInfo(0).normalizedTime < 1.0f); } }
EVERYONE I FOUND THE SOLUTION TO THE THIN WHERE YO HAVE TO SWITCH TO ANIMATE PHYSICS IN ORDER FOR THE RIG CONTROLLER TO WORK just click animate physics on your main character and its FIXED!!!!!
Thanks for great tutorial. I have a problem. If I get rifle and then pistol all works fine. But if I get pistol first and then rifle, the pistol does not holster and goes back to position of aim. I watched all twice and everything is just like you but still same issue. Does any body know the solution ?
4th run got everything right! And with the help of Fantastic Mr. TheKiwiCoder on the Discord channel I can add any amount of weapons too!! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! :)
I've noticed some very odd behavior following this tutorial in particular - I had it working quite well - followed to the 'T', but all of a sudden it just stopped working correctly - it was completely unpredictable, anyone else having issues where we're recording in play mode? [I prefer to record my animations in editor mode using the preview mode but that's neither here nor there]...
Great series, I learned a lot from this. I tried to make and I succeeded but the target of two bone ik constraint are in weapon pivot, so if I want to use those target it will be a little complicated so what I did was that I created an empty game object inside RigLayer and made those target child of that game object and used mutli parent constraint on both of the targets , 1 source object is WeaponPivot but the issue is that the targets won't move with weapon. Can you help me fix this?
I am glad I found this channel... quick question why are my keyframes failing to change the values of the source objects in the multiparent constraint on the inspector...?
For some reason when i walk over a pickup with my weapon it snaps back to the holstered position and picks up the weapon i just walked over anyone knows why ?
Everything that was in the CharacterAiming script I moved into RaycastWeapon::UpdateWeapon. So that’s, startfiring,stopfiring,updatefiring, and updatebullets. Sorry for the confusion.
Hi sir, i want to thank you first for ur awesome series !! you have no idea how much it helps, so thnak u so much !! I have a request, can you make a weapon shop like in "killing floor" game where you can buy in game many weapons and override the last weapon u had, or just make a video about how can we switch between multiple weapons (12 weapons like rifles / snipers...) with different hand placement in tps.. thank u again
You are an extremely talented developer. I am trying to make animation rigging work for what I want to do, which is have a character run around shooting enemies. But, the animation rigging system seems to be so complicated and difficult to understand and make work that unless I create exactly the same as you I can't modify it to do what I want. So, regrettable I have to try to implement the IK system in code instead. I hope I will be able to understand the IK code and what it does rather than fiddle with all the constraints and code using the animation rigging system. Feeling really frustrated with Unity right now. I wish you well with your channel.
Code is definitely simpler sometimes. If I had the time I’d like to try converting al the different constraints into a single constraint so there’s less properties to fiddle with
@@TheKiwiCoder Many thanks for what you do - I've almost got my IK system working as I want. When I'm done I'll try to implement by looking at what you're doing again.
have 2 problems..1 the pickup not working..idk why..i debuged it and when walk through it collides the player..but nothing happens..so i need to manually add them to player...second problem..when i press 1 or 2 to switch weapon..it doesnt switch them..it works just like a holster/activate weapon
@TheKiwiCoder hey i have this issue where when i pick up a weapon while holding a weapon it just snaps to the holster but doesn't play the animation any fixes?
@@TheKiwiCoder It also happened to me. I fixed it by checking if time is < 1 in the "while" loop while updating time in "do" loop in the HolsterWeapon() function.
This does not work at all for me. I followed the video exactly but the alpha 1 and alpha 2 pull out the opposite weapon that they are supposed to but the gun the shoots is the holstered gun. I've double checked everything but I cannot figure it out. Also the code from the previous video has been changed going into this video but it hasn't been addressed. I don't understand how no one else in the comments has this problem. Got it. I slowly went through all the code and found one duplicated line wasn't changed how it needed to be and one line was on the wrong side of a bracket.
Thank you for your awesome tutorials! I have one very nasty issue only with the secondary weapon: sometimes the muzzle flash and bullet is spawned from the holstered position. Checked everything but can't fix it. Any ideas?
Quick question, In the video where the bullet handling is done, for some reason if theres no target and like i show in the sky the bullets go in the middle of the floor.
Hey the video worked out perfecto, but i still Kind off have the bug where the weapon is still schootig while being equipped just have to Spam the mouse click button can you help?
@@TheKiwiCoder hmmm. it actually looks like the holsterIndex and activateIndex are the culprit here along with the holster animation not playing. not sure whats going on. my code is identical to yours (i think)
@@TheKiwiCoder found out the actual issue... in my start function i had to add "rigController.updateMode = AnimatorUpdateMode.AnimatePhysics;" at some point to resolve god knows what... turns out removing this now fixed the issue switching weapons. sigh...
Awesome video! Only thing I am struggling with at the moment is that my character can't climb stairs or even go up just one level up (door entrance steps). I was wondering how I would fix this, any help would be great! Thanks :)
@@TheKiwiCoder Hey! Thanks for the response. I implemented that and it works now but the animations are really jittery. They are fine with the old rigidbody + collider setup but with the character controller they are now like someone decreased the fps of the animation lol. Any help would be great and thanks again!!
@@TheKiwiCoder i use the character controller since the start of my locomotion character cause i got issues with rigidbody. it was not necessary to define the gravitation on the character controller, i didnt wirte a script to hold them on the ground and i dont find a script they try to access the charactr controller component.i use the unity rv. 2020.1.5f1
this error is occurring can anyone help me MissingReferenceException: The object of type 'TrailRenderer' has been destroyed but you are still trying to access it.
@@TheKiwiCoder i solved it by adding this code, but first we need to disable the autodestruct bullet.tracer.transform.parent = null; bullet.tracer.autodestruct = true;
First of all, this series of tutorials is really awesome! It has kept me busy for a couple of hours already and I've learned a whole lot. I did do some adjustments (topdown instead of 3rd person, twin stick movement/aiming, using the new input system) and it's working like a charm. I do however have a question about an issue I can't get solved. I want my character to start with 2 weapons at the get go instead of picking them up, but if I put the prefabs of the primary and secondary weapons in their respective slots only the primary weapon gets recognized. Any idea on how to fix that? Probably some line of code that needs a little adjustment or something, but I can't figure out where to look.
@@ernstplayzgd8015 yeaa never fixed that bug becouse i gave up on that project but you could try it whitout a trailrenderer and see if that could work out for you
Thanks for the comment, it would be great to share other suggestions improvements how to make it less frivolous for anyone reading this comment in future, thanks!
@@gorrillaconvention my solution is a bit lengthy although a asked in the discord channel and kiwi gave another solution you can try that. Call stop firing when you holster your weapon. let me know if it works !!!
@@syedhuzaifaali5322 I got it sorted. I went through all the code and found a few errors that I had missed while going through flustered the first time lol. Thank you for your help!
Bro, everything works fine, thanx to your tutorial, but when I equip weapon, at first animation works awesome. But when after a lot of try, aim becomes little bit deform to z axis. like hostler happens by hands getting inside my players body. Again the axis changes to something else. Help would very kind..
Hello, After i setup Two Bone IK Constraint for left wrist and hint joint, my character entire body start to rotate X Y Z a little. But that only happened after i setup Target in Two Bone IK constraint which is left hand empty container. Is there anything happened i can fix? I just start learning Animation Rig from your video. - This image is with Target on Wrist and have rotation issue on character body. ibb.co/2g95p25 - This image is without Target on Two bone IK Constraint ibb.co/4N5T6dV
@TheKiwiCoder Seriously. Your videos are great, except for the fact that you constantly change things, between videos and it is not clear what you have changed, and there is no serialization of videos. Which one is the FIRST video in the Animation Rigging video series, and which is next, next, next? To illustrate why this is a problem, I have been at the keyboard since 5am, it is now 6pm. I have the little guy setup and shooting, but I cannot get the aiming to work. I have to constantly stop, look for the previous video, and start again. I think that because I am not doing the videos sequentially, I am getting piss poor results. Please re-organize your videos, and if you have a series, use the features of RUclips put them into the proper sequence! Don't just jumble them in with other random videos! Mark
Thanks for the feedback! The previous video is usually mentioned at the start of the video so that should help. Sorry for the confusion! I will look into adding somesequence numbering, cheers!
@@TheKiwiCoder Thanks, that would help. Is there somewhere that I can download the rig without the model meshes, but with everything setup? I really just need to see how things are linked up and then can replicate the structure on my own models. I hope that Unity considers making this a LOT easier, perhaps something similar to how we do ragdolls. Pick the relevant bits, drop them into a widget, and presto, wham-o, you got yourself a working anim-Rig!
Learned alot from this segment and can't see myself not using this in future projects. Thank you!
Guys, for those who have problem that after taking new weapon, your current weapon doesn't holster, you can add this line before do while in HolsterWeapon method: yield return new WaitForSeconds(0.1f);
It will look like that:
rigController.SetBool("holster_weapon", true);
yield return new WaitForSeconds(0.1f);
do
{
yield return new WaitForEndOfFrame();
}
while (rigController.GetCurrentAnimatorStateInfo(0).normalizedTime < 1.0f);
Explanation:
I found this by spectating the rig animator while playing, sometimes the "holster_weapon" bool worked fine, but usually it triggered for a milisecond and because of that animation coudn't play. This line adds a little delay before the animation to let it play. Hope saved a few hours for someone.
Thanks!!
thank you
underrated channel
you deserve more❤️
Thank you SO MUCH for this series!
Great info! Thank you so much for really explaining rigging. I love how often "happy accidents" turn into jet packs hahaha
😂
ONLY OPEN WHEN YOU HAVE WATCHED THE WHOLE VIDEO!!!
.
.
.
to spice up the bullet bouncing and actually make it into "real" ricochet try this:
//(necessary variables)
[Range(0f, 1f)]
public float ricochetChance;
public float minRicochetAngle;
if (bullet.bounce > 0)
{
// calculate the bullet angle from the normal it hit
var bulletAngle = Vector3.Angle(hitInfo.normal, -ray.direction);
if (bulletAngle > minRicochetAngle)
{
if (Random.value < ricochetChance)
{
bullet.time = 0f;
bullet.initialPosition = hitInfo.point;
// maybe add some randomness on the reflect for some more realistic ricochet behaviour
bullet.initialVelocity = Vector3.Reflect(bullet.initialVelocity, hitInfo.normal);
bullet.bounce--;
}
}
}
Very underrated channel...👏👏👏👏u deserve more...
Thank you 😊
Had an issue where a holstered weapon was moving with the Weapon Aim, So I keyed that off like you've done for items, and then I added a source object on the position constraint to the hip bone and now it works well. 8) Excellent tutorials BTW, really well done.
bro u underrated yourself very much ,u are a pro
The world is full of very smart people ✌️
this one actually made my head smoke
Quick Fix: If your weapon is snapping into the holstered position and then it is equipping the new weapon it is because your animation transitions have a gap and therefore it exits the "do" loop instantly.
Solution:
1. Go to your Rig Controller and click on one of the Animation Transitions (between Equip and Holster)
2. In your inspector click the "Settings" dropdown. This should open up a menu panel.
3. Set Exit Time, Transition Duration, and Transition Offset to 0. If you cannot change Exit Time. Click "Has Exit Time" then set it to 0 and then Unclick "Has Exit Time".
4. Replicate/Do this for the rest of your transitions
That should Fix it
Cheers!
Thank you
Still having this issue, any idea of any other way to fix this?
@@gabz240024 Yes of course. There is a cheeky way of doing it. Before you set the trigger/bool to holster the weapon. You can play the weapon's animation forcefully. This will stop it from skipping the animation. Basically, when it enters the loop there is some delay in the animator that doesn't play the animation instantly so it just exits the loop. Here is a snippet of what it would look like.
var weapon = GetWeapon(index);
if (weapon)
{
rigController.Play("holster_" + weapon.WeaponSlot); -----> Add this line. Change the animation to something like holster_Rifle or holster_Pistol
rigController.SetBool("holster_weapon", true);
do
{
yield return new WaitForEndOfFrame();
} while (rigController.GetCurrentAnimatorStateInfo(0).normalizedTime < 1.0f);
}
}
Thanks a ton ..😍😍 Checking Daily whether you uploaded video or not thanks a lot... You are Awesome 😘😘
Haha, I'd love to upload daily if I could :)
You literally makes the best tutorials!!
Thanks!
Love your work bro. Keep up the Good work...
EVERYONE I FOUND THE SOLUTION TO THE THIN WHERE YO HAVE TO SWITCH TO ANIMATE PHYSICS IN ORDER FOR THE RIG CONTROLLER TO WORK just click animate physics on your main character and its FIXED!!!!!
edit: Never mind
congrculations to you bro you added a good tps library to youtube. thank you
Oh man! damn good... Thank you... a camera shake gonna make player more realistic while shooting or little body movement...
Agreed! That will help a lot. Also sound effects are really lacking still
@@TheKiwiCoder yes! hope you cover all in future... loving this series...
Nice work.keep it up 👍
Cheers!
Awesome video ... Please make a video on aim down sight using this methods of constraints
Will do Ty
I kinda like the Half-Life system of carrying around a U-Haul load of weapons, most using different ammo
Yeah attaching 7 or so weapons to the character visually might look a bit odd with this system 😅
Thank you for making awesome tuts. Keep going. Good luck ❤️
Glad you like them!
Amazing tutorial !!!!
Thank you!
Very good bro.
Cheers!
Helps me alots, thank you bro
You’re welcome bro
At 8.16 where does weapon.UpdateWeapon(Time.deltaTime) on Line 24 come from? This method was not in RayCastWeapon Script at end of last video. Thanks.
I have the same question!
@@diliupg If you go on theKiwiCoders Discord channel you will find the UpdateWeapon() method in the C# chat.
@@davidcalderwood5540 Fuckin hell I watched back like 4 videos trying to find that
@@NorbertCsecs I too re-did the whole series from #03 twice!! But it was not in vain. Understanding a lot of things got streamlined. :)
public void UpdateWeapon(float deltaTime) {
if (Input.GetButtonDown("Fire1"))
{
StartFiring();
}
if (isFiring)
{
UpdateFiring(deltaTime);
}
UpdateBullets(deltaTime);
if (Input.GetButtonUp("Fire1"))
{
StopFiring();
}
}
Awesome! ♥️💥
Thanks, good luck!
❤❤😍😍😍 Super Awesome!!!!!!
Thank you! Cheers!
Every time i watch video ...something wrong happen with the gun ...i have to set it up... now until this video the gun is flying like a bird....😁😁😁
awesome !!!!!!!!!!!!
Thank you!!
You're welcome!
Thanks for great tutorial. I have a problem. If I get rifle and then pistol all works fine. But if I get pistol first and then rifle, the pistol does not holster and goes back to position of aim. I watched all twice and everything is just like you but still same issue. Does any body know the solution ?
👍
4th run got everything right! And with the help of Fantastic Mr. TheKiwiCoder on the Discord channel I can add any amount of weapons too!! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you! Thank you!
Thank you! Thank you! Thank you! Thank you! :)
how to make the cups and shoot to make them fall ?
I've noticed some very odd behavior following this tutorial in particular - I had it working quite well - followed to the 'T', but all of a sudden it just stopped working correctly - it was completely unpredictable, anyone else having issues where we're recording in play mode? [I prefer to record my animations in editor mode using the preview mode but that's neither here nor there]...
Great series, I learned a lot from this. I tried to make and I succeeded but the target of two bone ik constraint are in weapon pivot, so if I want to use those target it will be a little complicated so what I did was that I created an empty game object inside RigLayer and made those target child of that game object and used mutli parent constraint on both of the targets , 1 source object is WeaponPivot but the issue is that the targets won't move with weapon. Can you help me fix this?
I am glad I found this channel... quick question why are my keyframes failing to change the values of the source objects in the multiparent constraint on the inspector...?
For some reason when i walk over a pickup with my weapon it snaps back to the holstered position and picks up the weapon i just walked over
anyone knows why ?
Where does the updateweapon function come from ? is it the same as updatebullet or updatefiring ? a bit confusing
Everything that was in the CharacterAiming script I moved into RaycastWeapon::UpdateWeapon. So that’s, startfiring,stopfiring,updatefiring, and updatebullets. Sorry for the confusion.
thanks
Your videos is awesome 😍 but it lil bit confusing lots of indexes
Thanks! I try to keep them as simple as I can 😊
Why i cant move weaponpivot and weaponpose when i try record animation?
Hi sir, i want to thank you first for ur awesome series !! you have no idea how much it helps, so thnak u so much !! I have a request, can you make a weapon shop like in "killing floor" game where you can buy in game many weapons and override the last weapon u had, or just make a video about how can we switch between multiple weapons (12 weapons like rifles / snipers...) with different hand placement in tps.. thank u again
Does the hand constraint work to instantiate different weapons or you have to adapt it?
Issue - active weapon does not holster when picking up a different weapon.
Ideas?
Great Tuts!
recheck code on yield return StartCoroutine in 19:42
@@ashwinj9879 took me awhile but i figured it out. Animations play direction was the wrong direction.
not working for me as well, would love to get more options on what can go wrong
You are an extremely talented developer. I am trying to make animation rigging work for what I want to do, which is have a character run around shooting enemies. But, the animation rigging system seems to be so complicated and difficult to understand and make work that unless I create exactly the same as you I can't modify it to do what I want. So, regrettable I have to try to implement the IK system in code instead. I hope I will be able to understand the IK code and what it does rather than fiddle with all the constraints and code using the animation rigging system. Feeling really frustrated with Unity right now. I wish you well with your channel.
Code is definitely simpler sometimes. If I had the time I’d like to try converting al the different constraints into a single constraint so there’s less properties to fiddle with
@@TheKiwiCoder Many thanks for what you do - I've almost got my IK system working as I want. When I'm done I'll try to implement by looking at what you're doing again.
have 2 problems..1 the pickup not working..idk why..i debuged it and when walk through it collides the player..but nothing happens..so i need to manually add them to player...second problem..when i press 1 or 2 to switch weapon..it doesnt switch them..it works just like a holster/activate weapon
Did you solve the first problem, I followed the same but whenever I try to grab the weapon, it collides with player and does anormally stuff.
Sir, your teaching is very good. My holster animation doesn't work when i change my weapon.Weapon switch is work.
How did you fix the holster animation please??
@@DRE_WW if you found the solution pls say it, bcs I have a big trouble with it
Help!! When i am switching the weapon, the current equipped weapon does not play its holster animation.
Open the animator view to check it’s in the correct state. Check the properties on the handik rig layer are animating correctly in the inspector view
@@TheKiwiCoder I have seen in the animator window, only the equip animation of the weapons are playing on switching.
@@farrukhmalik8747 did you figure out what was causing this? Having the same issue.
Use the following code:
private IEnumerator HolsterWeapon(int index)
{
isHolstered = true;
var weapon = GetWeapon(index);
if (weapon)
{
rigController.SetBool("holster_weapon", true);
bool test = rigController.GetBool("holsterweapon");
rigController.Play("holster" + weapon.weaponName);
string animBaseLayer = "Base Layer";
int holsterAnimHash = Animator.StringToHash(animBaseLayer + ".holster" + weapon.weaponName);
rigController.CrossFadeInFixedTime("holster" + weapon.weaponName, 0.6f);
while (rigController.GetCurrentAnimatorStateInfo(0).fullPathHash != holsterAnimHash)
{
yield return null;
}
//while (rigController.GetCurrentAnimatorStateInfo(0).normalizedTime < 1.0f)
// yield return new WaitForEndOfFrame();
}
}
@Назар Bruh No problem man. Sorry the code is kind of messy... didnt clean it up before posting.
Thankyouuu
@TheKiwiCoder hey i have this issue where when i pick up a weapon while holding a weapon it just snaps to the holster but doesn't play the animation any fixes?
I fixed it
Excellent! What was the fix?
@@TheKiwiCoder It also happened to me. I fixed it by checking if time is < 1 in the "while" loop while updating time in "do" loop in the HolsterWeapon() function.
@@karthikeyubusa5630 I Didnt get It Plzzz explain me bro
@@suyogmokal9292 did u find a fix?
This does not work at all for me. I followed the video exactly but the alpha 1 and alpha 2 pull out the opposite weapon that they are supposed to but the gun the shoots is the holstered gun. I've double checked everything but I cannot figure it out. Also the code from the previous video has been changed going into this video but it hasn't been addressed. I don't understand how no one else in the comments has this problem.
Got it. I slowly went through all the code and found one duplicated line wasn't changed how it needed to be and one line was on the wrong side of a bracket.
can you share your fix?
Are you planning to publish the project? Having some issues with IK and I can't find the problem.
The project files are available via Patreon: patreon.com/thekiwicoder
Thank you for your awesome tutorials!
I have one very nasty issue only with the secondary weapon: sometimes the muzzle flash and bullet is spawned from the holstered position. Checked everything but can't fix it. Any ideas?
You’re welcome! Best to ask this on discord :)
Did you solve the matter ?
@@bymehmetyildiz yeah, I fixed it but I am not quite sure how to be honest. Will come back to you if I am able to find out.
Quick question, In the video where the bullet handling is done, for some reason if theres no target and like i show in the sky the bullets go in the middle of the floor.
Hey the video worked out perfecto, but i still Kind off have the bug where the weapon is still schootig while being equipped just have to Spam the mouse click button can you help?
Strange... i find that i have to press Alpha1 and Alpha2 twice in order to switch weapons?
Could it be GetKey vs GetKeyDown?
@@TheKiwiCoder hmmm. it actually looks like the holsterIndex and activateIndex are the culprit here along with the holster animation not playing. not sure whats going on. my code is identical to yours (i think)
@@TheKiwiCoder found out the actual issue... in my start function i had to add "rigController.updateMode = AnimatorUpdateMode.AnimatePhysics;" at some point to resolve god knows what... turns out removing this now fixed the issue switching weapons. sigh...
Awesome video! Only thing I am struggling with at the moment is that my character can't climb stairs or even go up just one level up (door entrance steps). I was wondering how I would fix this, any help would be great! Thanks :)
Hey, you could use a character controller instead of rigid body to walk up stairs using stepheight, but then you’d need to implement gravity yourself.
@@TheKiwiCoder Hey! Thanks for the response. I implemented that and it works now but the animations are really jittery. They are fine with the old rigidbody + collider setup but with the character controller they are now like someone decreased the fps of the animation lol. Any help would be great and thanks again!!
@Alexander Shvets Tips for implementing a character controller: ruclips.net/video/4y4QXEPnkgY/видео.html
@@adiljawad9 Tips for implementing a character controller: ruclips.net/video/4y4QXEPnkgY/видео.html
@@TheKiwiCoder i use the character controller since the start of my locomotion character cause i got issues with rigidbody. it was not necessary to define the gravitation on the character controller, i didnt wirte a script to hold them on the ground and i dont find a script they try to access the charactr controller component.i use the unity rv. 2020.1.5f1
this error is occurring can anyone help me
MissingReferenceException: The object of type 'TrailRenderer' has been destroyed but you are still trying to access it.
I saw you in the discord.
@@TheKiwiCoder i solved it by adding this code, but first we need to disable the autodestruct
bullet.tracer.transform.parent = null;
bullet.tracer.autodestruct = true;
@@TheKiwiCoder once again the funniest part of the tutorial 27:34 .
@@manndevani3664 haha assault rifle jet pack!
@@manndevani3664 now where does this method include?
Your voice is like Dream
🤣I hope I didn’t put you to sleep.
@@TheKiwiCoder Haha
First of all, this series of tutorials is really awesome! It has kept me busy for a couple of hours already and I've learned a whole lot. I did do some adjustments (topdown instead of 3rd person, twin stick movement/aiming, using the new input system) and it's working like a charm. I do however have a question about an issue I can't get solved. I want my character to start with 2 weapons at the get go instead of picking them up, but if I put the prefabs of the primary and secondary weapons in their respective slots only the primary weapon gets recognized. Any idea on how to fix that? Probably some line of code that needs a little adjustment or something, but I can't figure out where to look.
Another Problem is when i press 1 and then q or so the trail renderer gets Destroyed
Did you fixed now?
@@서재민-c7p nope
@@dripyman6146 AAAAH same issue here
@@ernstplayzgd8015 yeaa never fixed that bug becouse i gave up on that project but you could try it whitout a trailrenderer and see if that could work out for you
High quality but too frivolous
Thanks for the comment, it would be great to share other suggestions improvements how to make it less frivolous for anyone reading this comment in future, thanks!
Animation graph cannot change the value of the Multi parent Constaint weight? even through I add the keys in? any ideas?
there might be another animation in another layer forcing it on/off. Try the discord if you’re still stuck
@@TheKiwiCoder Thanks
after holstering both weapons and press fire no gun fire but when I equip any weapon the other holster gun also fires with it solution needed ??????
worked out a solution :D
@@syedhuzaifaali5322 What was your solution?
@@gorrillaconvention my solution is a bit lengthy although a asked in the discord channel and kiwi gave another solution you can try that.
Call stop firing when you holster your weapon. let me know if it works !!!
@@syedhuzaifaali5322 Will try that tonight! Thank you! Although now I alpha 1 and alpha 2 equip the opposite weapon lol
@@syedhuzaifaali5322 I got it sorted. I went through all the code and found a few errors that I had missed while going through flustered the first time lol. Thank you for your help!
Bro, everything works fine, thanx to your tutorial, but when I equip weapon, at first animation works awesome. But when after a lot of try, aim becomes little bit deform to z axis. like hostler happens by hands getting inside my players body. Again the axis changes to something else. Help would very kind..
Uncheck the z-axis on the multiaim constraint, it’s in the settings on the component
@@TheKiwiCoder Perfect, thanx bro..
@@TheKiwiCoder Wow this resolved so many bugs i was trying to fix in a single check that i am almost going to cry
❤❤❤❤❤❤❤❤❤
Can i get the project?
Is this working with netcode?
Bro can you please copy and paste the code in the vid.... Thanks
Will you share the code in github or something eventually?
Have you played Rust?
Yes 😂 I think I spent nearly 72 hours straight one weekend.
Hello, After i setup Two Bone IK Constraint for left wrist and hint joint, my character entire body start to rotate X Y Z a little. But that only happened after i setup Target in Two Bone IK constraint which is left hand empty container. Is there anything happened i can fix? I just start learning Animation Rig from your video.
- This image is with Target on Wrist and have rotation issue on character body.
ibb.co/2g95p25
- This image is without Target on Two bone IK Constraint
ibb.co/4N5T6dV
Please upload this scripts on github
Patreon.com/thekiwicoder :)
@TheKiwiCoder Seriously. Your videos are great, except for the fact that you constantly change things, between videos and it is not clear what you have changed, and there is no serialization of videos. Which one is the FIRST video in the Animation Rigging video series, and which is next, next, next?
To illustrate why this is a problem, I have been at the keyboard since 5am, it is now 6pm. I have the little guy setup and shooting, but I cannot get the aiming to work.
I have to constantly stop, look for the previous video, and start again. I think that because I am not doing the videos sequentially, I am getting piss poor results.
Please re-organize your videos, and if you have a series, use the features of RUclips put them into the proper sequence! Don't just jumble them in with other random videos!
Mark
Thanks for the feedback! The previous video is usually mentioned at the start of the video so that should help. Sorry for the confusion! I will look into adding somesequence numbering, cheers!
@@TheKiwiCoder Thanks, that would help. Is there somewhere that I can download the rig without the model meshes, but with everything setup?
I really just need to see how things are linked up and then can replicate the structure on my own models.
I hope that Unity considers making this a LOT easier, perhaps something similar to how we do ragdolls. Pick the relevant bits, drop them into a widget, and presto, wham-o, you got yourself a working anim-Rig!
When you code, you go too fast to follow so please stop and review the edits before switching back to Editor.