How to spawn 3d objects at fixed points at random times?

Godot Version

v4.2.1.stable.official [b09f793f5]

Question

I’m randomly trying to spawn different cubes at fixed points for the player to hit. For example. I want a cube to spawn in front of the player and the player hits it for a point. Then a few seconds a different cube will spawn at the side of the player and so on.

I have no idea what I’m doing nor know how to spawn objects not in the tree.

Any help will be welcomed. Thanks in advance!

1 Like

A good place to start might be reading the docs about instancing scenes.

The basic idea is to create your cube object and save it as a template (scene) to be later instanced via script.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.