Godot 3.1: Creating a Simple 3D Game: Part 1 (Intro, Nodes & 3D Physics) #GodotEngine

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

Just a little background on me: I'm a highschool computer science and digital media teacher, and since 2006 I've been teaching video game design (starting with Macromedia Flash) and creative technology in summer camps to elementary and middle-schoolers. My YouTube channel has been all about Blender since 2011 when I started it, but I've been learning and playing with Godot for the last year. I'm very happy to add another open source program to my channel starting today. :)

πŸ‘οΈŽ︎ 28 πŸ‘€οΈŽ︎ u/BornCG πŸ“…οΈŽ︎ May 12 2019 πŸ—«︎ replies

Since there's only a few interesting 3D tutorials on Godot, you got yourself a pretty interested audience if you want to develop it further. Hope you the best. Liked and subscribed :)

πŸ‘οΈŽ︎ 14 πŸ‘€οΈŽ︎ u/jimmylovecraft πŸ“…οΈŽ︎ May 12 2019 πŸ—«︎ replies

Everyone making at least decent quality YouTube tutorials for Godot will have me as a sub instantly. Good work here, thanks for contributing to this community!

πŸ‘οΈŽ︎ 7 πŸ‘€οΈŽ︎ u/TheFr0sk πŸ“…οΈŽ︎ May 12 2019 πŸ—«︎ replies

You taught me everything I currently know about Blender, I watched basically all the 2.79 tutorials you have a few years ago! Really excited to see where these Godot tutorials go! The more 3D Godot tutorials, the better! I've been learning UE4 for the last little while, but I've been considering jumping to Godot because of the fact that it's OSS and it's a lot more light-weight. Hoping you'll do some sort of 3D platformer or action-adventure style game in Godot.

Also waiting for your Blender 2.8 tutorials! :)

πŸ‘οΈŽ︎ 3 πŸ‘€οΈŽ︎ u/kart_racer πŸ“…οΈŽ︎ May 13 2019 πŸ—«︎ replies

Awesome!

πŸ‘οΈŽ︎ 2 πŸ‘€οΈŽ︎ u/DevinWatson πŸ“…οΈŽ︎ May 12 2019 πŸ—«︎ replies

Ill definitely watch it

πŸ‘οΈŽ︎ 2 πŸ‘€οΈŽ︎ u/StingyKarmaWhore πŸ“…οΈŽ︎ May 12 2019 πŸ—«︎ replies

RemindMe! 9 hour "Check this awesome 3D tut when you arrive home"

πŸ‘οΈŽ︎ 2 πŸ‘€οΈŽ︎ u/aikoncwd πŸ“…οΈŽ︎ May 13 2019 πŸ—«︎ replies

My first response was: Hmm 44 mins kinda long knowing its only part 1 (of 12 if i remember correctly?).

But after some skipping through the video i think i'm gonna dig it and i'm gonna watch it once i have the time in a month when all deadlines are gone. Are you planning on releasing 1 part a week or a faster or slower schedule?

πŸ‘οΈŽ︎ 2 πŸ‘€οΈŽ︎ u/thebspin πŸ“…οΈŽ︎ May 13 2019 πŸ—«︎ replies

As someone who is new to Godot and game development in general, thank you so much for this. It's been incredibly helpful

πŸ‘οΈŽ︎ 2 πŸ‘€οΈŽ︎ u/teachmetobehuman πŸ“…οΈŽ︎ May 14 2019 πŸ—«︎ replies
Captions
hello and welcome part 1 of creating a basic 3d moving dodge game using the Godot game engine my name is Colin I'm a youtuber computer a summer camp manager and a high school computer science and media teacher and since 2011 I've dedicated this channel teaching just one piece of software blender for 3d modeling and rigging 3d animation creating visual effects for movies and creating simple code free video games using blenders game engine again all of this using just one piece of software blender but you know what it's time to grow with the release of but our 2.8 just around the corner in July of 2019 and I'm most definitely gonna be covering that on this channel so don't worry it's time to add another piece of software Godot if this is your first time hearing of it it's called the Guto game engine and I've been using Godot for about the last year or so behind the scenes and this is your first time hearing of Godot here's the rundown since 2014 Godot has been an open source program which means like blender it's free and relies and grows on community contributions and public development Godot is the third fastest growing project on github the world's largest online development platform and it's both a 3d and a true 2-d game engine since Godot 3 was released a little over a year ago the dough is a modern powerhouse it you just OpenGL 3 the same graphics library used to create blender 2.8 and its new real-time render engine evey Godot is also easy to learn and create games and for the first time you program your Godot games using either GD script Godot zone language based on Python or in c-sharp and even if you've never programmed before it's fairly easy to learn and I'm gonna walk you through it in this series you can get get over yourself at triple W Kudo engine org and it's available for Windows Mac and Linux and when you make a game in Godot you can export it to run and possibly sell on major platforms like Windows Linux Mac Android and even iOS there are games out there right now on the major app and games doors made in Godot here are few examples [Music] [Music] [Music] [Music] got it okay let's jump into game development using the cat Oh game engine Before we jump in let's go ahead and check out the project we'll be making in this tutorial mini-series on how to create a basic move and dodge game we'll be making this game this game is a simple moving dodge game where you the player has to navigate move and dodge objects in a 3d environment you are playing a character that's actually a ball that has to roll around a 3d maze and avoid touching enemies if you touch an enemy you'll die and go to the game over screen you have to collect this is your goal collect all the coins in the maze and then you win and you go to the you win screen okay this is a simple project that we're gonna cover over about eight or ten or twelve videos in this tutorial mini-series on how to create this basic moving dodge game that once you create it step-by-step he'll understand how to use Godot and how to make a basic game and then you can build upon there if you want to make a bigger better game I will note that everything you need for this mini series in other words all the 3d models all the textures all the sound files all the images I'll give you links to those in the description area below each video as you need them in this series okay let's go ahead and jump in and as you can see I have it here on my desktop Godot is not a program that you need to install there is no installation process you just download the program for yourself and here I have it on my desktop and if you double-click on it there it is it's opened up and you can see it opened up a command prompt window on windows and I'll just minimize it and you get godot's project manager to start now I will note that on a Windows computer it will ask you if Godot is allowed to access the internet and if you trust it to and you have administrator privileges yes you can allow it to access the Internet and private networks it's ok as long as you've gotten Godot from the official website you're fine on a Mac Mac OS might not trust Godot by default because you download the Godot engine from the Mac OS App Store you might need to give your computer permission to run a program that's not from an officially recognized developer I'll put a few screenshots on the screen right now so you know how to enable your Mac computer to run Godot so you can get going for yourself right away so on the screen right now I have godot's project manager which usually has its main area as a list of projects that you've previously created so you can choose which one you want to open but by default you don't have any projects so it gives you this message you don't currently have any projects would you like to explore the official example projects in the asset library well no we're gonna press cancel and we're gonna make our own game project right away to do that I'm gonna press new project and this little window pops up and right away it's giving me an error it's saying well it's trying to save into My Documents folder in my user folder on my computer's C Drive in Windows and that's an okay place to save but when you make a new cadeau project it needs to be in an in its own empty folder and My Documents folder is definitely not empty and so that's a problem so what I'm gonna do is I'm actually gonna make my project have a name and at the same time I'm gonna create a new empty folder on my computer with that project name when you make a new Godot project it has to have its own new empty folder with a name that you want to use so I'm gonna go ahead and press browse and I don't want to save in My Documents folder I'm gonna save onto my desktop so you can see it so I'm gonna navigate to my desktop which is normally a folder in your user folder if you're on Windows or Mac mine is actually on a different Drive it's on my D Drive and there's my desktop folder and there's that Godot version 3.1 program that's right here on my desktop so I'm gonna say a select current folder this is my desktop and I'm going to create a new folder for my project so I'm gonna call this Godot basic move and dodge game and that's gonna be the name of my project and my project folder I'll just make that a capital letter and press create folder and as you can see it out of that folder name to my project path it actually made that folder on my desktop and now I don't have that air anymore we're good to go I'm gonna press create and edit just a note here that if you want to turn down the quality of your game to support older computers or older cell phones if you're exporting to an older Android or iPhone device you might want to select OpenGL es2 in my case this is gonna be a computer game and so I'm just gonna support OpenGL ES 3 so let's go ahead and open the DOS editor this is the Godot editor and it's a pretty intimidating interface so let's go ahead and break it down the main part of the interface in the middle with your 3d scene is called the main workspace area along the top bar of Godot there are four switch buttons for this main workspace area the default is this 3d workspace but if you're making a 2-dimensional 2-d game like a platformer or you're making even a flat 2d menu for your game or a heads-up display like a little coin counter well you're gonna use the 2d workspace and as you can see when you switch over it looks entirely different it has a set of outlines hopefully you can see these on YouTube they're purpley blue aqua and pinky looking out lines and these describe or show you the size of your current viewport that you'll actually see your game in next up of course we have a 3d viewport and after that is the scripting workspace this is where you're gonna do all of your coding and adding scripts using godot's in this series anyways using godot's native language GD script this is where you program objects to have behaviors we're gonna deep dive into this in the next video also under the script workspace this is where you can look up online documentation of everything in the GD script language if you're not sure how to make a character move you can look it up in the online docs and this actually excellent features that help you get directly from your code into online doc so you can look up the code that's relevant to what you're doing and then go back quickly into your own code last up is the asset library workspace this is godot's online repository of things like example projects and image textures like sprites 3d models materials for 3d objects we're not gonna get into here in fact I haven't explored this very much because again I'm going to be giving you everything you need in the links below these videos on YouTube in the description area on the left on the bottom and on the right are panels they're called docks in Godot and on the left hand side at the top is a dock called scene this is probably the most important panel or dock in Godot this is where you create what are called nodes that are the building blocks of your scene this ends up looking like a list of everything that's in your game scene like characters and sprites and lights and cameras and meshes this is a lot like blenders outliner window that you would find at the top right of blenders interface but you end up spending a lot more time here because you actually make new objects over here in this side panel dock below that is the import dock this is where you can change import settings specific settings for an object that you have selected in your game in case it didn't import right or you want to change the import settings of that object this could be like for a sprite or an image texture that you're bringing into a game you might want to change the filter on that image or you might want to change how Godot treats a 3d mesh object as it imports it into Godot from let's say a program like blender you might want to tweak a few of the settings when you're bringing in other files below that is the file system dock and this is basically a list of all the files and folders that you have in your game folder on your computer your game folder has a special name in the editor it's called res so if you're ever programming and you need to reference another file in your game project folder like an image texture or a 3d model you probably point to it by saying hey look in res kind of like a website address like HTTP colon slash slash but it's res colon slash slash and you can see a list of folders and files like image textures or scenes or things like that all listed here on the bottom of your main workspace is a panel that has lots of different areas to it things like output debugger audio animation whenever you need to edit some of the main aspects like animations in your game or tweak the audio in your game you'll do it down at the bottom we can't see anything there we'll get to those later but just know that there will be bottom panels and sometimes when you're creating your game lastly on the right side we have a few Doc's we have another really important one that's called the inspector if you have an object selected in your game or really anything like a node like a like something to actually add something you can't see like sound or music in your game if you select it you can see all of its properties on the right hand side in this inspector dock panel for instance if you have a image sprite in your game like an image file well if you want to change the size of the image like its dimensions or its rotation or even what image file it should display its properties will be over here behind this inspector dock is the node dock and basically this is where you'll be able to allow objects to communicate with one another using what are called signals we're gonna get into signals I'm gonna get into programming and the upcoming videos in this miniseries so don't worry about it but also know that you can add objects to groups in this node panel so don't forget that this node dock is here let's take a few moments to look at godot's 3d viewport in the 3d workspace if you're familiar with blender you'll be right at home here because many of the controls in the Godot 3d viewport are the same controls that you would use in blenders 3d viewport as well if your computer has a mouse with a mouse scroll wheel you can scroll up and down with your mouse in this viewport area and that will zoom the scene in and out usually to the middle of the scene where the three axes meet so scrolling up zooms in scrolling down usually zooms out if you hold your mouse wheel down like a button and then move your mouse around you can see that this is what's called orbiting orbiting is like rotating your view around in the 3d scene usually around the middle of your scene or the three axes meet if you're orbiting and you move your mouse up while holding that middle mouse wheel button down you can look at your scene from the bottom likewise if you move your mouse down you can see your scene from the top and of course you can spin your view around from any direction that you like if you want to see what's to the left and right and above and below your current viewport you can hold the shift key down on your keyboard and then orbit so shift and middle mouse wheel press down like a button and you can move your mouse and this is kind of like strafing if you're used to playing 3d first-person shooters looking left or stepping left and stepping right it's called strafing but it's called panning in Godot you can also hold shift and pan up and pan down as well and unlike blender if you hold your right mouse button down and move your mouse around this lets you look around in your 3d scene okay so this is the look around kind of controls for your scene so you don't have to actually move your view to see behind you you can do that very easily and if you're looking around by holding your mouse right button down you can also press the W key and this will enable fly through modes so I'm pressing the W key while holding right of the right mouse button down on my mouse and I believe if you hold s you can go backwards of course the controls for that are a little bit weird and if you press D you can move right a you can move left and q will go down and E will go up also in this Tweedy viewport you have this top left menu I'm gonna orbit around so I can see the middle of my scene again you have this top left menu which lets you change your current view if you want to see your scene from the top well you can just select top if you want to see your scene from the right you can do that if you want to switch between perspective modes and what they call orthogonal view modes in Godot you can do that and if you're not familiar with what this is perspective which is the default lets you see a scene kind of naturally in a perspective view if you have an object and it's further away it will appear smaller than if it's close to you which is how things work in the real world if you want to see your game that's 3d but look more flat you can change this to orthogonal view and as you can see it's still 3d but it looks flat and again objects that are farther away or nearer will not change in size but let's go ahead and change it back to perspective if you have an extended keyboard on your computer like a keyboard with one of those site number pads you can use those number keys but not the top row or number keys you can use the side numpad number keys to switch between these views really easily if you press the 1 key on your number pad it will go to your front view if you press 3 you'll go to the right view if you press 7 you'll go to the top view and if you press the 5 key in the middle of your numpad it'll toggle between orthogonal view which is a flat view and perspective view so if we're like this in perspective you can hit 5 and it'll go into orthographic and then back and back and forth lastly you can split your 3d viewport up into different separate viewports if you want to split this viewport into two separate 3d view ports you can go up to view and change it either to left and right two viewports like that and you can orbit each one and zoom each one independently you can also have two viewports that are up and down divided like this this is especially handy if you want to see through your scenes camera in one viewport and then edit the scene in the other viewport you can also have four at the same time or three at the same time but typically we just have one or two one for the scene and one through the camera which we don't have in our scene yet let's go back to one okay let's go ahead and start actually building our game level in the 3d workspace viewport area but actually when you build objects or add objects into your game you're not doing it in this viewport area you're first adding it over here in your seeing doc panel yeah this scene dock area is where you add what are called nodes which are those building blocks for a game there are a few shortcuts that Godot 3.1 is added to get you started but if you press this little plus button in the scene tab area you can see it brings up a create a new node dialog box which has a list which is really this kind of a list where you have collapsible sections and categories this is called a tree and in this tree you're gonna find categories of different kinds of nodes and you might recognize some things that might be handy for you to have in a game nodes are like little building blocks so you have to combine together to make parts or even an entire game so some objects in your game might need to be animated so those parts of your game or objects might need to have an animation player node as part of them you might need to have an object tween in other words animate back and forth and back and forth in a level so you might have a tween or they might need a timer to know when to do things or they might have a skeleton like an armature rink or maybe you need to have 3d objects and that's in a category called spatial and in spatial you might have a camera to add to your game if you want objects to bump into each other you'll probably need a collision shape if you want to have three-dimensional objects that behave according to physics well there are what are called physics bodies kinematic bodies bones rigid bodies static bodies if you want to bring a 3d model in from a 3d modeling program like blender you'll need to add what's called a mesh instance and that's under visual instance and then geometry instance and mesh instance is right here so all of these nodes when you combine them together in the right way they are the building blocks of a Godot game scene now when you make a Godot scene I'm going to close this panel for now when you make a cadeau scene it needs to have one root node and they already give you shortcuts to add one of these knows to start off you've seen so I'm gonna press a 3d scene and what this is going to do is this is gonna add a node that I could have added through this little plus button it's called the spatial node and that's a good note to start off your entire tree in other words this kind of structure with collapsible categories that will make up your overall scene so I'm gonna press 3d scene and if you're following along so can you and when it added that spatial node of course it adds it into this area but it also gives us a 3d gizmo handles or we can rotate the spatial know this this 3d object that has nothing in it but it's required we can move it around we can rotate it and if I use one of these top tools I could probably even scale it but you know what you actually do not want to do that for this spatial node so I'm gonna press ctrl-z a few times on my keyboard until it goes back to the middle we're just gonna leave it put now this spatial node is gonna be the root node of our scene so I'm actually gonna name it right away I'm gonna call it level so I'm gonna double click on its name I'm gonna type in le ve L with a capital L at the beginning and everything that we add to our game all the main objects are gonna be children in other words subcategories or underneath and indented below this main level root node the first object I'm actually gonna add to my game is a three-dimensional box in other words a cube and this isn't gonna just be a cube that sits there static in space it's gonna be a cube that actually behaves in the way that a box would have behaved if it was in an environment with gravity so we're gonna add a physics object to our game now when you add objects into a 3d game they're not just gonna be meeting it up usually of one node if you think about a 3d object like a box it has to have a 3d mesh object in other words polygons that you can see but just because you have polygons doesn't mean that they actually behave in a way that relates to physics so it turns out that you need to have another node object that is linked to it that is called a collision shape and both of those things need to be part of what's called a body object in Godot so we're gonna add that one first you're gonna see exactly what I mean I'm gonna press + and I could actually navigate my way to find a spatial and you don't follow along with me here a spatial and then a collision object and then physics body and then a rigidbody and that even has a few or at least one subcategory called vehicle body but if you don't want to find and navigate this tree you can just type in the search bar rigid and it'll narrow down your search now I need you to know that the blue icons here are all 2d versions of the same nodes we're not gonna be using those until later in this series so we're gonna select rigidbody the one with a little pinky red icon and double click on it just like that now when we added it to our scene we actually can't see it because it has nothing to see but it did become a child of our level it's a child and I know that because it has a line and it's indented it's more farther away from the left-hand side of this panel as opposed to level and if I collapse my level it hides all of its children so that's the way that it should look now this rigidbody I'm gonna double click on its name and type in box that's what it's going to be called and it has this little warning error message yes something is wrong let's go ahead and see what that says it says this note has no shape so it can't collide or interact with other objects consider adding a collision shape or collision polygon as a child to define its shape well what does that mean well it's saying that a rigidbody is great and it's good you need to have it in order to have a physics object that will tumble and fall with gravity in your scene but it doesn't know enough about itself in order to really interact with other objects like bump against other things it needs to have a collision shape so I'm gonna select that box and we're gonna give it a child this is called a tree and and branches of that tree this box will be its own branch with its own children so I'm gonna press this little plus with box selected and I'm gonna search for and again if you don't want to search any we don't find things yourself I'm gonna search for a spatial and it will need a collision object and actually it's not another it's just called collision shape right there if you don't want to find it in this tree you can just type call ollege and that will help you find it collision shape is right there I'm gonna double click on it to add it and it added it as a child of the Box reach it body object now if you didn't do it right and if you had your level selected when you added the collision shape well it might look something like this both of these are now even they're both direct children of your level and that's not right and you get errors on both of them if you want to refix the parenting here I'm gonna drag the icon of its collision shape onto the box and that will make it a child of box and now you can see it's indented more from the left side of the screen and the box will collapse the collision shape into it and we collapse it like that so that's great this box thing has a collision shape and it has an error I'm gonna click on that air and see what it says it says a shape must be provided for collision shape to function please create a shape resource for it oh boy it's actually not as scary as it sounds and this is a perfect time to introduce and look at the inspector dock panel on the right side of the screen I'm gonna press ok and I'm going to select my collision shape and look over here on the right side of my screen at the inspector dock panel this collision shape object needs to know what shape it should be should it be a cube should it be a cylinder should it be a cone should it be a sphere it doesn't know you have to tell it and that is called a property it's under the inspector tab this is that dock the inspector so next to shape look what it's saying with my closing shape selected it's empty doesn't know what shape to use so I can just make a new or select new resource shape for this I can press this little down arrow and choose a new box shape you can see what other basic primitive shape 3d shapes there are from this list I'm gonna select a new box shape and as you can see we now can see the size of our box on the screen we're not gonna touch it or move it at all please because we're about to give this object a mesh and you'll see why we don't want to play with this at all until we add that mesh so let's go ahead and do that our box over here in the scene a panel has one child a collision shape node and so I'm gonna select the box again that box needs a mesh so I'm going to select it and press plus and I'm going to delete my search so we can find it ourselves under node and spatial and visual instance there's a section called geometry instance and here if I expand that out we can find mesh instance don't get confused if we open that up there's soft body and there's also one called CGI mesh somewhere if I just search for mesh you can see that there's one called print me CSG mesh we're not gonna use that one the one that we want is called mesh instance so I'm gonna go ahead and double click on mesh instance to add it into my scene and if you did it right this mesh instance will be a child of the box the box will have both a collision shape and its own mesh now the mesh we can't actually see it because it doesn't know what mesh object what polygons to actually use later on in this miniseries we'll be actually taking a model that we have in blender and we'll be exporting it from blender into a file format a 3d model that Vito can understand and then importing that model into Godot to use for different objects in our game but for now this mesh instance a node with it selected over here in the scene dock if I then go over to the inspector with the mesh selected we can see this mesh is empty as know what mesh to use and Godot actually have some primitive meshes built in if I click next to empty you can see it can add a new cube mesh cylinder mesh plane mesh sphere mesh we're gonna add a new cube and as you can see it adds a cube into this little measure right here we can see it but we can also see it in our 3d viewport and if I orbit around yeah it's a full cube and we are good to go now let's jump back and take a look at that collision shape for a moment because we might want to adjust where this object collides with other objects if I select this collision shape node in my scene dock you can see we have these little pink dots and these represent the sides or what are called the extents how far this primitive mesh extends that's why it's called the extents of the collision shape where they are so if I grab this little pink dot at the top and drag it up you can see that my collision shape in other words the force field where it hits other objects in the scene is now bigger than the visual mesh that we can see and if I play my game this cube will actually hit other objects not on its own mesh but where this larger bounding box is of the collision shape if I do this and this it won't really make sense in my game for my player because the box will hit other boxes or other things before they actually see it hit the box so it's important to know how big your collision shape is as opposed to the actual mesh itself this collision shape if I select it I can reset these extent values if I select the closer shape over here and then in the inspector I can actually expand out this box not using the little arrow but just clicking on it itself will expand or contract that area you can see the extents are 2.6 3 9 and other long number values if I change those back to 1 I believe and 1 and press tab and press 1 and press Enter or just reset those all to 1 you can see it's now at the right size and I'll make them too small again the cue will end up going into other objects at least visually ok so now we have some objects for at least one object using multiple nodes in our scene so I'm gonna go ahead and try and see if I can run this scene and play my actual game or see our game scene so I'm gonna go up to the top a right of my top bar in the editor and I'm not gonna press this play button because that will play my entire game and that actually requires that I tell my game project what the first scene in my game is and typically your first scene in your game is a loading screen or your title menu of your game we don't have those yet so I'm not gonna press this play button instead I'm just gonna press the play scene button which is this one which will play the scene that I have open right now so play scene and it tells me this scene has never been saved safe before running yes so I'm gonna do that yes save and it saves it into my project folder called res in the editor and it will give a name of level dot t SC n @ es en file is a cadeau scene and i named my first node level so that's good I like that I'm gonna press save and it'll save and it'll launch my game and this is my game we can't see it and that's because our scene doesn't have a camera a 3d scene needs a camera in it so let's close that game preview window and add a camera to our level in order to add a camera we have to make sure we add it to our main level which is called level we can't add a camera as a child of the box well we could but we don't want to so I'm gonna select level and I'm gonna press + and I'm gonna delete my search you'll notice also that if you have previously used nodes they'll be down here so this is handy if you want to add more rigid bodies you don't have to find them or search for them you can just click down here to add them a 3d camera everything 3d is under spatial and it's called camera right there there are subcategories we can just add the normal camera or you can just search for a camera and add the pink one not the blue one okay that's for 3e let me add a camera to our scene again it should be a child of the level and not a child of the box so if it is you can drag it on the level and if I select it over here I'll need to move it using this gizmo controller here and if I pull it back on the blue z-axis you'll see that it looks like this it's pointing in this direction and I can move it up in fact if you're used to blender you'll notice that in Godot the axes are a little bit funny the z-axis is actually your forward and back axis and your y-axis is up and down its opposite in blender X the red axis this is the Cartesian plane XY stuff it would have learned in middle school math class the y axis is up and down in Godot whereas the z axis is up and down in blender a little bit different but it's not anything you need to worry about just know that Y is up and down if I pull this camera back and then I go with the camera selected I can actually preview the camera that's what we have right now maybe all unprotect that box pulling it back some more and then I might pull it up a little bit and then if I grab this little hula-hoop I can rotate it on the x-axis to point it down there are also in Godot individual move rotate and scale gizmo tools and you can get to those I believe with the QWERTY keys on your keyboard if you press Q it'll bring you the multi select tool it also has movement rotate W will bring up your move tool only E will bring up rotate R will bring up scale and then there's a few more that we'll get to in future videos so I'm gonna move my camera back and let's see what it looks like I might rotate it more pointing down and let's go ahead and see what our game looks like when I press play scene and our box Falls because it's actually a rigid body which is a physics body I'll do that again I'll close that and press play scene our cube is there we can see it and it's falling down that's great let's go ahead and add one more object and then we'll play around with this physics scene we're add a floor and so what I'm going to do is actually select my entire box by clicking on it over here and I'm gonna use my move tool and I'm gonna move the box up it's important that you don't move things individually components like the collision shape if you move it up well that means that it's gonna collide with in different spots or with different sides than the actual mesh so when you want to move an object select its most parent object itself the box in the scene panel and then you can drag it up I'm gonna add a floor to the middle of my scene so I'm gonna select my main scene called level I'm gonna press plus we're gonna add a physics object but this time it's not gonna be a rigidbody it's gonna be under spatial and visual partly not visual it's gonna be under collision object and physics body if we want an object to be in our scene that's 3d but we don't want it to move or fall with gravity but we need to collide with other objects that's called a static body static means not moving so I'm gonna select static body and double click and it added it to my scene and it's a child directly of our level it's giving me an error let's see what that is it says this node has no shape so it can't collide or interact with other objects consider adding a collision shape or collision polygon as a child to define its shape we've seen this before it needs a collision shape to know where its bounds are where its force fields are that it'll hit other objects at so I'm gonna select this static body I'll name a double click to name it floor and we hit selected I'm gonna press + I'm gonna add a collision shape the same thing that we've already added to the our box the rigidbody and so if I double-click on collision shape it'll add it as a child of my floor and it has a problem it's little error says that it doesn't know what shape it's supposed to be and that's over again and hopefully you're seeing this pattern here that's again I have to select it and then look at its inspector its properties and I'm gonna give it a shape I'm gonna make my floor I'm gonna make it another box actually I'm gonna change it right there and it looks like that now I'm gonna change his extents in a moment after I add its mesh you might be tempted to use not a box to use a plane instead but actually if you add a plane it might give you a message yes it is it's giving me a little error over here saying that plane shapes don't work well and will be removed in future versions of Godot please don't use them so they're being deprecated there they don't want you to use them anymore because they don't work well so we're not gonna use plane shapes we're gonna use a block shape okay we our floor also needs a mesh so we can see so I'm going to add another cube I'll select my floor we can press the plus to add a mesh instance which we have in our recently used node so I'll just add it that way or search for mesh and mesh instance not see GES mesh that when we don't want to use and this mesh instance doesn't know what mesh or what polygons to use so I'm gonna select with it selected in the scene dock I'm going to select its mesh in the inspector we're gonna use a cube now if you have a cube mesh or any mesh and you click on this little icon it will expand out the properties of that mesh and this is where you can change its size so I'm gonna keep its size and remember that Y is up-and-down we're going to leave it at 2 in dimension up-and-down I'm having a thick floor but I will need to change its size on the x and y axes so I'm gonna change it I've actually click in there and type let's say I want to be 30 so I'll press Enter and that's gonna be the size of my floor on the x-axis I'm gonna leave Y its height at 2 and I'm gonna change its Z to 30 as well so I've got a nice big floor to work with this will not work yet until I change my collision bounds so I'm gonna go back over to my floor and select its collision shape that first node that we added to it and you can see that if i zoom in it might be quite hard to see so I'm gonna hide my mesh for a moment so you can see it the force field where this static body will know to hit other things is really small it needs to be bigger side to side and front and back so I can drag these manually I can also if I show my actually I won't quite show my mesh again if I have my collision shape-note selected over here I can go into its box shape in the inspector and I can expand it out just by clicking on its name and I can type in the values that I want now extent values are a little bit different than overall dimension or size values our size of our floor is 30 by 30 by 2 but the extents of a collision shape I'm gonna hide the mesh again are away from its middle so if you want to have it have an overall height of 2 then the y-axis extents should be 1 because it's 1 from the middle up and 1 from the middle down same thing for X and Z we want to have 15 and 15 and 1 for y obviously so 15 1 15 will mean it's actually 30 across 30 front and back and 2 up and down so if I go and show my mesh instance now you can see that that's the exactly the same size okay I think we're good to go I could even move my floor down to meet my grid so I'm gonna select my floor in the scene panel and I can move it down using the move tool if I hold the control key or the command key I believe on a Mac while I drag it'll snap to even increments the same increments that are the units on the grid floor so if I just hold ctrl or command on a Mac and left-click and drag down it'll snap down to B to meet the surface of the floor ok let's go and see what this looks like I'm gonna play my scene when I play scene I believe it'll automatically save there's a little star here which means that this scene not saved yeah it's saved and we can see our box fall and it hits the floor the reason why everything's a little bit blue is because the sky the environment that are seeing is blue and we'll talk about how to change that in a future video let's do one more fun thing before the end of this video let's rotate this cube and see how it tumbles and let's add more duplicate cubes so I'm gonna select my box and I'm gonna use the rotate tool and in fact I'll just use the selection tool that's the Q key on my keyboard and I'm gonna rotate it in a funny way so that hopefully a corner hits the ground and let's try playing this scene and as you can see it tumbles like a normal cube what and if I go into my scene panel I can right click on my box and I can say duplicate and now I've got box and box 2 I can rename box to box 1 and I'll select box 2 and move it straight up B I'll rotate it a little bit differently and be able to play it one more time right click duplicate and I'll move this one up and rotate it differently and let's see what this looks like through my camera 3 2 1 placing and now we've got a physics scene that acts fairly realistically so that will be it for this first video on creating a basic move and dodge game in the Godot game engine in the next video we're gonna start making a character and programming using GD script and we're gonna make our character be able to move left right forward and back when you press the WASD E or the arrow keys on your keyboard that will be it for this video thanks for watching if you like this video of course click that like button below this video and if you want to see more videos like this one in Godot or in blender click on that subscribe button below as well check out my facebook page at facebook.com slash born CG on that page I post previews and sneak peeks and surveys but what I'm working on next thanks for watching see the next one you you
Info
Channel: BornCG
Views: 384,247
Rating: undefined out of 5
Keywords: tutorial, lesson, 3D, modeling, modelling, beginner, godot, game, engine, game engine, programming, c#, python, program, code, coding, software
Id: VeCrE-ge8xM
Channel Id: undefined
Length: 44min 56sec (2696 seconds)
Published: Sun May 12 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.