Instantiate & move random 3D units (Godot 4/C#)

<p>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.</p> <p>And, of course, you usually want to use some randomness to avoid having too similar visuals&hellip;</p> <p>So, in this tutorial, we&rsquo;ll see how to instantiate some pre-made scenes using C# code, and also how to use Godot&rsquo;s built-in random utilities to place or move units in a basic scene. We won&rsquo;t talk collisions or navigation, we&rsquo;ll just be doing transform-based translations; but we&rsquo;ll also discuss some quick tricks for getting better randomness in a video game.</p> <p><img alt="" src="https://miro.medium.com/v2/resize:fit:1100/1*zY1HnIpWRowjorjM60_tgw.gif" style="height:522px; width:1000px" /></p> <p>As usual, since we&rsquo;ll be coding our logic in C#, make sure that you have a version of Godot with .NET enabled.</p> <p><a href="https://medium.com/codex/instantiate-move-random-3d-units-godot-4-c-c6788735c05e"><strong>Click Here</strong></a></p>
Tags: Godot 4