Quantcast
Channel: Answers by "Althaen"
Viewing all articles
Browse latest Browse all 33

Answer by Althaen

$
0
0
First you need to connect an object to the script. In this example case a Rigidbody object. So save this in a variable. //Drag the prefab with a rigidbody to the prefab& slot in the inspector var Rigidbody : prefab; function Update{ //Now instantiate it. clone = Instantiate(prefab, transform.position, transform.rotation); } //transform.position instantiates the object at the coordinates you set. //transform.rotation makes the object have the same rotation. //You can place an empty object and attach this script to it to instantiate inside it but I'm sure there are other ways.

Viewing all articles
Browse latest Browse all 33

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>