How to switch animations?
Hi! I've bought a sniper asset where animations don't work correctly. When I'm aiming without a scope it plays the animation for aiming with a scope and vice versa. How do I change these events? I can't find the way to do this in C#. Or, can somebody please show me how does this work, how does the system know that it has to aim through scope when it's on? Here's a bit of the code which I think would be responsible for the action, I tried to change "!scope" to "scope" but nothing changes:
 anim.SetBool(hashs.scopeHash, scope);
 anim.SetBool(hashs.aimHash, aim);
 if (aim && !scope)
         {
             var newZoom = Mathf.Lerp(mCamera.fieldOfView, zoom, Time.deltaTime * 5);
             mCamera.fieldOfView = newZoom;
         }
         else
         {
             var oldZoom = Mathf.Lerp(mCamera.fieldOfView, unzoom, Time.deltaTime * 7);
             mCamera.fieldOfView = oldZoom;
         }
Your answer
 
 
             Follow this Question
Related Questions
Animation Rigging works differently for different animations 0 Answers
Timeline character animation cancels out the character script gravity logic 1 Answer
How do I puse an animation? 1 Answer
How to set the blend tree threshold value during run time? 0 Answers
Continuous keydown in Animator 0 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
               
 
			 
                