

You should now in your animation timeline have this.Ĭlick to 0.5 then insert another key with the key icon and go to your KinematicBody2D transform. Make sure on scl is blue and click on the key to create a key frame. At the top of Godot you will see these options. In the top left panel you should see this option. Now follow the last step again and name the animation Walk.įor this animation we going to make sure we have a root object selected to do that you need be sure you have clicked on the AnimationPlayer. You can change this if you like but to keep this tutorial simple and not too long we will only be animating the walk animation. Godot 2D top down movement tutorial – new animationįor our idle animation we just going to keep everything blank so our player will stand still when on Idle. It will look like this.Ĭlick on the Animation button. To start animating we need to click on our AnimationPlayer.Īt the bottom of the screen you will see the animation panel. We now have the basics setup we want to now just create some animations so that we have a player that looks like its walking or sliding to a position in our scene. You can resize it to fit your character using the resizing controls. Godot 2D top down movement tutorial – Collision shapes If your character is square or rectangle use your relevant shape. Click on the CollisionShape2D object and select this option. I have a round character so I want to use a circle. We now want to setup our CollisionShape2D. Godot 2D top down movement tutorial – Sprite setup That would be on the far right in this box like so. My character is called channelchar.png.įrom here you want to click on the sprite object in your hierarchy.ĭrag your character image in the texture slot on your sprite. I just dragged and dropped my character into the FileSystem pane. You can use the default sprite for godot called icon.png or you can bring in your own. Adding our assets for our Godot 2D top down movement Re arrange them so that they are nested the way it looks below. Once you have added all the nodes you should have a hierarchy with all the nodes. KinematicBody2D, CollisionShape2D, Sprite, AnimationPlayer. Right click on your Player and add the following nodes. In order to do this click on the + next to the game scene.Ĭreate a 2D scene for our new game object and rename it to Player. We want to create a new scene for our Player. Since Godot uses scenes to separate individual game objects. You now want to hit ctrl+s in order to save your scene. Rename your node to Game so that it looks like this. Creating 2D scene in our 2d top down game If you wish to skip ahead and not go through the whole tutorial you can get the project files here: project files Don’t like reading? Watch the video. Animated player 2d top down movement Where to get the project files You should have a player that can move in the following fashion. At the end of this tutorial you should have a character which you can move using the arrow keys on the keyboard and your mouse. In this tutorial we will be covering the basics of KinematicBody2D, sprites, spriteanimation, GDscript and various movements we can achieve with godot in a top down game view. A Godot 2D top down movement tutorial for beginners.
