Okay so I’m doing a project for school and I’m using this script to create random objects (trash)…I’m still new to scripting, but I wanted to know if I if there was something I could do to this script to make the objects project forward. If i can’t do that, I guess I need to know what script would work best to project objects as if you were throwing them.
thanks in advance, you guys are great.
var trash : GameObject[];
function Update () {
if (Input.GetButtonDown("Fire1")) {
Instantiate (trash[Random.Range(0, trash.Length)], transform.position, transform.rotation);
}
}