From the course: Advanced Unity 2D: Platformer Player Movement
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Adding wall collision animation - Unity Tutorial
From the course: Advanced Unity 2D: Platformer Player Movement
Adding wall collision animation
- [Voiceover] So now that we're able to detect whether we're attached to a wall or not, let's add in some new animations to make the player look like he's actually sticking to it. We'll select the player, go to the animation, and create a new animation clip. Here, we'll call this player normal slide animation. And let's make sure that we put this inside of the animations folder. Now, inside of our artworks folder, let's scroll down and find the player normal wall slide and drag it over to the timeline. We'll also change its sample rate to 12. You may notice that this is the only sprite that isn't facing to the right, while everything else is. That's because when we attach to the wall, we're going to do some things to tweak the player's animation to make him look like he's stuck to the wall a little bit better. Let's save this animation state, and go into our animator. Here, you'll see that we have our new slide animation. Let's scroll over, make some room, and put this right here in…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.