Hello,
I would like to ask is there is a way (function) that helps me select only a certain zone/part of an object. The object’s texture has some transparency and shadow and I would like to grab that object only by its visible textured part, not by the shadow.
Thanks.
You can create custom functions and call them what ever you want. If your prefab has the parts seperate, you should be able to assign any part of it to a gameObject or transform type var.
(eg)
var part_1 : GameObject;
//Then have your way with it(ie)
function Cutoff() {
part_1.enabled = false;
}
//Depending on what you want tot do with the Object
function Update() {
if(Input.GetKeyDown(“m”)) {
CutOff();
}
}
//Or call your function with delay (ie)
function Start() {
Invoke(“CutOff”,10);
}