but I’ll need more of the same functions. It’d be great if I could find which object the collider is attached to (to put in an if statement), as I don’t want tags…
You can have each collider to be attached to different empty game objects. Then all are attached to a root game object. Assigning unique index to each you can know which is colliding.
Then you have a dictionary to figure out which object is which
function OnTriggerEnter(){
transform.root.SendMessage("CollisionDetected", index);
}
then on the root object
function CollisionDetected(ind:int){
var obj = dictionary[ind];
}
Then you know what object is calling.Well I do not know exactly what you plan on doing but maybe that will give you a lead.