Implementing a basic moving platform (Godot 4/C#)

Let’s see how to create a simple 3D moving platform with customisable speed and waypoints!

Mina Pêcheux
CodeX

--

Video games are about characters, avatars and NPCs… but they’re also about environment, scenery and cool dynamic objects in the decor! Typically, when you’re making an adventure/platformer game, you’ll almost always need to make some animated platforms at some point.

So, today, let’s see how to make a simple moving platform in Godot 4/C#!

By the end of this article, you’ll know how to use a Path and a PathFollow node to have a platform object move along a specific path, how to have this platform loop or walk back the other way, and finally how to ensure the collider of the platform follows the visuals properly.

By the way, in this tutorial, we’ll see an example in 3D — but everything works the same with the 2D version of the nodes that we’ll study :)

Of course, don’t forget that you can get the demo scene and all the assets for this example on my Github 🚀 with all my other Godot tutorials :)

--

--

Mina Pêcheux
CodeX

I’m a freelance full-stack web & game developer. I’m passionate about topics like CGI, music, data science and more! Find me at: https://minapecheux.com :)