|Topic was automatically imported from the old Question2Answer platform.
Okay I am not new to programming and i just came from a different game engine.
i need to spawn/generate/instantiate an object into my scene using gdscript(the moment it runs).
After viewing the 3D environment, i know object MeshInstance should contain Mesh, transfrom, visibility and so on(basic understanding of objects)
So I tried to manually spawn a plane mesh and make the code similar to its parameters:
var plane = MeshInstance.new()
plane.mesh = PlaneMesh
plane.skeleton = "Root"
i received a logic error. it ran but i dont see my plane mesh also i cant seem to use
to set the position of my new plane mesh, even though translation should have been a node under transform.
Please help. How do i spawn an object and set its coordinates.
PS i was searching online but it talked about “Classtype” or “
Add_child” or “
all of which i cant seem to use