Member-only story
Godot 1–01: Instantiating & Moving 3D Units (Godot 4/C#)
This is actually easier than you think!
One of the key moment of any game dev project is when you start to combine your scenes together, and create some NPCs, mobs or objects at runtime to populate your environments.
And, of course, you usually want to use some randomness to avoid having too similar visuals…
So, in this tutorial, we’ll see how to instantiate some pre-made scenes using C# code, and also how to use Godot’s built-in random utilities to place or move units in a basic scene. We won’t talk collisions or navigation, we’ll just be doing transform-based translations; but we’ll also discuss some quick tricks for getting better randomness in a video game.
As usual, since we’ll be coding our logic in C#, make sure that you have a version of Godot with .NET enabled:
And of course, don’t forget that you can get the demo scene and all the assets from this demo on my Github 🚀 with all…