Hi. My problem is that: I create this script:
var blue : GameObject;
static var mozna : boolean = false;
static var moznaa : boolean = false;
function Update () {
var hit : RaycastHit;
if(Physics.Raycast (transform.position, transform.forward, hit, 1000)){
mozna=true;
if(moznaa==true){
var Newblue : GameObject;
Newblue = Instantiate(blue, hit.collider.gameObject.transform.position, hit.collider.gameObject.transform.rotation);
}
}
}
And when I shoot in a wall, blue create at the central point this wall. I want to create at any point no on a central point. Please Help!