+1 vote

Hello Everyone,

I have discovered Godot for myself a short time ago and have already implemented a few things in 2D, mostly just Youtube tutorials. ;)

Now I have an idea in 3D and wanted to realise it in a project. I would like to create simple 3D objects dynamically and make them disappear again.Therefore my question can I create in Godot dynamically with GDScript a parallelogram (base with 4 points in 3D coordinates and a depth/volume).
It would be really great if someone can give me a hint or give me some example code lines ;)

Thanks and see you soon Bobby

Godot version 3.2.3
in Engine by (15 points)

Have you looked at the Procedural Geometry page in the docs yet? There are several methods to do what you're trying to do in Godot, and that page breaks them all down.

1 Answer

0 votes

Ye sure thats easy.
You can place a position 3d in your character scene. Then you can create a separate scene for your shape, and it should appear in you resources. So lets just say your parallelogram scene is called, cube.tscn. Then you can do something like:

var 3dshape = preload("res://cube.tscn")

And then using your position 3d you can write

var b = 3dshape.instance()

And although this isn't very clear, it should give you an idea of how to do it.

by (18 points)

Thank you afk27111
I will test it right away.

Thx and cya Bobby

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 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 webmaster@godotengine.org with your username.