Unity Endless Runner (REMAKE) - Player Sliding

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everyone and welcome back to my YouTube channel so in today's episode we are going to add the sliding to our 3D character so that we can slide and avoid these obstacles and without any further Ado let's Dive Right In so first of all we have to go to maximo.com so that we can download the animation I've already selected my character which is called Thai and under the animations tab let's search for slide like this one it is called Running slide as I said we are using root motion to animate the character let's head down low to download it make sure to select the format fbx for Unity and we don't need the scan then hit download again after that we can import it to our project by dragging this file and put it inside our player folder next we can open up the animator component by double clicking on this animator and this window pops up let's drag our new animation and to be able to transition from running to slide we have to right click and make Transition from running to running slide then we have to get back and to control the transition we add a parameter very simply we have added the jump trigger with the same way we can add another one and call it slide then we can use it for our new transition from the inspector window and select the right trigger that is called slide finally we have to remove this option as exit time because we need to transition from running to slide as soon as we make a down swiping we've already used the chat GPT to create our swipe control script let's double click on it to open it up under the update method we are checking if we have swiping in this case we are going to use the down swiping using get component animator because the script is attached to the player that has the animator component by writing get component we want the animator that has the parameter or the trigger slide we can set it using the method dot set trigger which takes in the name as a string I'm gonna pass in slide and that's all what we need make sure to save the script using Ctrl s or file save by default our 3D character is playing the Running Animation recently we have added the jumping and yeah it works let's try sliding we have the small issue with the sliding animation we have to select it from the assets and under reg make sure to change the animation type from generic to humanoid that's really important and hit apply and we have to make something that is called big into pose under the animation tab we have to check the top option to fix the rotation of our 3D character when he's sliding and use original as the based upon make sure to apply the changes and give it another try and now we'll be able to slide when we use a down swiping so I think that's pretty much it guys for this video I hope you like it if you have any question or comment make sure to write it under the comment section down below and I will see you in the next one
Info
Channel: GDTitans
Views: 3,766
Rating: undefined out of 5
Keywords: GDTitans, endless runner game, unity, unity3d, temple run, subway surfers, endless, runner, running game, game, game development, game for android, infinite runner, player running, Unity Endless Game, unity android game, swipe input, swipe input unity, swipe controls, mobile swipe inputs, mobile, touch controls unity, touch controls, mobile swipe controls, chat gpt, unity tutorials, jump and gravity, slide with root motion, sliding in unity, slide, root motion, unity 2023, swipe
Id: JApbmS2beQ8
Channel Id: undefined
Length: 3min 8sec (188 seconds)
Published: Sun Jul 30 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.