Posts

Showing posts from November, 2023

3D Movement in Godot

Image
Today I'm going to take a look at coding a character for 3D movement. We'll look at how to basically make an object move in Godot, then we'll explore making it move in different directions. Setting Up the Character Let's just get right to it. I've opened up a new Godot scene. The first thing we'll create is our character. Remember how scenes in Godot are all made of different nodes piled on top of each other? In the Scene Menu on the left of the screen, we can pick our first node. Which node do we want first? Well, since it's a 3D object we're making, we could pick "3D Scene" as our first node... or, to be more specific, we can click "other node" and add in a CharacterBody3D node. When we put the CharacterBody3D in, it will come up with a yellow exclamation mark saying that it wants a CollisionShape3D as a child of the node, so it can bump into other objects. So, I'll right-click on the CharacterBody3D's name, click Add Child