Code: Select all
public Transform spawnpos;// the position where i wanted to clone my sphere
void Update()
{
if (Input.GetKeyDown("q"))
{
Instantiate(gameObject, spawnpos.position, spawnpos.rotation);
Destroy(gameObject, 2);
}
}
Abschließend: Wie kann ich eine Kugel erzeugen, wenn ich „q“ drücke, und es werden 10 erzeugt, wenn ich „q“ drücke? 10 Mal
Tysm, dass du bis hierher gelesen hast! Einen schönen Tag noch!
Mobile version