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…</p>
<p>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.</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’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>