- Home /
Sprite Sheet wont animate with Unity Animation
So I am making a 2d side scroller and I am trying to get my character to have the ability to grab a ledge and climb up the ledge. I have a sprite animation of him hanging and pulling himself up on to the ledge. I also created a unity animation of the sprites plane moving up and then to the right to get on the ledge. I have an empty game object that when the player collides with it it triggers the animation. So the problem I am having is when the unity animation starts the sprite script freezes and doesn't do the animation. I really hope someone can help me because I am a little bit lost on trying to get this to work. Thank you
Here is the code I have for the animation event.
function OnControllerColliderHit(hit : ControllerColliderHit)
 {
     var aniPlay = GetComponent ("aniSprite");
     var hangRight : boolean = true;
     if (hit.gameObject.tag == "hangCornerR")
         {
             hangRight = true;
             
             if (hangRight)
             {
                 animation.Play("HangR");
                 aniPlay.aniSprite (16, 16, 0, 8, 20,20);
                     
             }
         }    
     }
Your answer
 
 
             Follow this Question
Related Questions
Trigger Animation doesn't work, please help me. 1 Answer
How to recalculate collider bounds when i animate a 2d sprite? 1 Answer
Need help with animation colliders in 2D 0 Answers
Physics.ignoreCollision and Animations: Not playing nicely together 1 Answer
add animation frames to existing spritesheet with animations? 0 Answers
 koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                