0 votes

I want to procedurally generate a small 3d city, I already created the code for a simple road generation using GridMap and an adaptation of a maze algorithm, now I want to generate houses but I cant find out how to create a simple rectangle 3D shape in code.

Godot version 3.3.2
in Engine by (75 points)
edited by

1 Answer

0 votes

find out. This quite simple actually.

var myMesh = MeshInstance.new()
myMesh.mesh = CubeMesh.new()
myMesh.mesh.size = Vector3(5, 2, 1)
by (75 points)
Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.