How to make a 3D platformer in Godot 4

preview_player
Показать описание
This tutorial uses Godot 4 Beta 8.

- you can follow this Mixamo tutorial but you won't have to make the library but just import it straight into Godot

Follow me:

Thanks to game endeavor, poly mars, and Dani for inspiring me, I used to do unity but I switched to the Godot game engine. GD script 4, Godot 4, four
Рекомендации по теме
Комментарии
Автор

Bro teached me more in 6 minutes than I could learn in a 40 minute tutorial 👍

honzosaurus-no_furry
Автор

Wow, I did not realize that Godot gives you a starter script for character controllers. That is really awesome actually.

johnnobon
Автор

Thank you for zooming in on important portions when needed!

ChinchillaBONK
Автор

THX for updated version of Miziziziz video: "How to make a 3D platformer in Godot in 8 minutes". Apretiate Your work Friend!

pierrenagonio
Автор

amazing tutorial, straight to the point, works fine, love it

CibuYT
Автор

Amazing video, short and useful, congratulations!

douglasmedeiros
Автор

C# code for anyone who's decided to start with c# - the quirks are that you can't access .x and .y directly of vectors (and .z), rather you need to make a temp variable and make the changes there, then reassign. There's also a few other quirks

using Godot;
using System;

public partial class PlayerController : CharacterBody3D
{
public const float Speed = 5.0f;
public const float JumpVelocity = 4.5f;
Node3D CameraBase = null;

float CAMERA_SENSITIVITY = 1.0f;

// Get the gravity from the project settings to be synced with RigidBody nodes.
public float gravity =

public override void _Ready()
{
Input.MouseMode = Input.MouseModeEnum.Captured;
CameraBase =
}

public override void _UnhandledInput(InputEvent @event)
{
{
Vector3 CameraRotation = CameraBase.Rotation;
CameraRotation.X -= * CAMERA_SENSITIVITY;
CameraRotation.X = Mathf.Clamp(CameraRotation.X, Mathf.DegToRad(-90), Mathf.DegToRad(90));

Vector3 CharacterRotation = Rotation;
CharacterRotation.Y -= * CAMERA_SENSITIVITY;
CameraBase.Rotation = CameraRotation;
Rotation = CharacterRotation;
}
}

public override void _PhysicsProcess(double delta)
{
Vector3 velocity = Velocity;

// Add the gravity.
if (!IsOnFloor())
velocity.Y -= gravity * (float)delta;

// Handle Jump.
if && IsOnFloor())
velocity.Y = JumpVelocity;

// Get the input direction and handle the movement/deceleration.
// As good practice, you should replace UI actions with custom gameplay actions.
Vector2 inputDir = Input.GetVector("Left", "Right", "Forward", "Backward");
Vector3 direction = (Transform.Basis * new Vector3(inputDir.X, 0, inputDir.Y)).Normalized();
if (direction != Vector3.Zero)
{
velocity.X = direction.X * Speed;
velocity.Z = direction.Z * Speed;
}
else
{
velocity.X = Mathf.MoveToward(Velocity.X, 0, Speed);
velocity.Z = Mathf.MoveToward(Velocity.Z, 0, Speed);
}

Velocity = velocity;
MoveAndSlide();
}
}

PikaDevs
Автор

Love how straight to the point this is- would love more 3D game tutorials by you (adding enemies, moving platforms, different movement mechanics- whatever comes to mind)

vpsip
Автор

First Godot tutorial I found that wasn't outdated. Thanks so much!

trey
Автор

thanks man, this is a great tutorial!

cupofdirtfordinner
Автор

Is there a part 2? How to add more levels, enemies etc.

jameshpotato
Автор

tysm keep it up man !! fast and easy to understand !

crabbite
Автор

That was a great starting point,
no arsing about, straight into the video and not too full of waffle,

TheRealKaiProton
Автор

you go way too fast you need to slow down your tutorial

dreamweddingentertainment
Автор

The files in the download link are completely different from what is shown on screen. 😅 I tried those files anyways but there was no animation player in the list. And after adding in one there doesn't seem to be any animations at all. So can't do this tutorial past the 'New Inherited Scene' step. That is where it all just hits the wall. 😑

SovereignVis
Автор

why do I keep getting a node configure warning for static body 3d telling me to change the size in the child nodes, but when I do, the player simply falls through?

justingrassmyer
Автор

for some reason while animating, i keep getting an error “attempt to call function ‘play’ in base ‘null instance’

spidrrblx
Автор

Spent 2 days on that Kinematic Body change to 3DCharacter, the Blender to Godot animations rock though. Also finding more info right in the editor👌

markstumbris
Автор

im getting an error at 3:40
it says that the "if" part needs to have a : after it but when i add it everything else breaks

badmusicproducer_offical
Автор

How would I go about adding a landing animation?

superbitable