- Home /
Question by
$$anonymous$$ · Mar 15, 2015 at 07:23 PM ·
collisionobjectsplacing
Placing objects error
#pragma strict
var cb : GameObject;
function Update () {
if(Input.GetButtonDown ("Fire1"))
{
var instance : GameObject = Instantiate(cb, transform.position, transform. rotation);
}
}
This is my script called plc for placing copies of object cb...
#pragma strict
function OnCollisionEnter (collision : Collision){
collision.transform.GetComponent(plc).enabled = false;
}
This is script what disable plc script when happen collision between object and copy of that object. (Simply I don´t want to have to two or more objects in row). This scripts are for "creator mode" in game... Can somebody help me? I´m lost...
1.png
(191.1 kB)
Comment