Dynamically create player/randomly/procedural defined RigidBodies, Sprites, and Shapes at the location of a mouse click?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Just1RandomGuy
:warning: Old Version Published before Godot 3 was released.

Can I dynamically create player/randomly/procedural defined RigidBodies (2d and 3d), Collisions, Sprites, and Shapes with in-game editable attributes at the location of a mouse click?

I am working on a simulator game project similar to SimLife, SimEarth, SimAnt and a little Spore as well and I like godot, I’m just not sure if godot is best suited for that.

:bust_in_silhouette: Reply From: GR00G0

I am quite new to godot aswell but I think I have learned somethings:

  1. In 3d you could use a raycast where the camera is and then create a meshinstance or whatever you need there.
  2. In 2d you can use your mouse position
  3. For procedural 3d meshes you can create a new mesh, and use the SurfaceTool(check the docs) to generate a mesh and assign it to your object.