Here’s my code:
using UnityEngine;
using System.Collections;
public class Instantiate : MonoBehaviour {
//position and rotation can be equal to that of an object if you use the object's ID.
public Rigidbody Sphere;
public Transform Spawn;
void update ()
{
if(Input.GetButtonDown("Fire1"))
{
Instantiate(Sphere, Spawn.position, Spawn.rotation);
}
}
}
Keep in mind that Spawn is an empty game object (if that means anything). Also, I am new to Unity, so use simple terms on me.