it activates the first code I showed here for every object the script is on, when I would like it to only activate when that particular object is hit
I debugged it and it registers that it hits but it turns the “isKinematic” option off for every object, when I would only like to when that particular object is hit
Hope I explained it well enough. Any help would be great, thanks
That script will only trigger if there is a trigger collision between that specific object, and an object tagged with “proj”.
This is the big problem with tags - it’s hard to figure out exactly what’s tagged with a tag in a scene, and forgetting to remove tags can cause major glitches.
To debug this, try adding this to your OnTriggerEnter:
if(other.tag == "proj") {
Debug.Log("This object: " + gameObject.name + " registered a colision with this object: " + other.gameObject.name);
...
}
That’ll tell you a lot more about what collisions are happening.
Yes. I //'d it out and tried again but still doesn’t solve my problem
the collision isn’t the thing that’s causing me the problem. the problem is that it only registers the IsKinematic becoming false once, whereas I need it to register it for every object it hits