So here i am again, I’m trying to enable the object as kinematic when it collides with an object with a certain tag. I’m assuming this can be done but i haven’t been able to figure it out. any help please?
OnCollisionEnter(Collision collision) {
if(collision.collider.gameObject.CompareTag(“tag”)) {
GetComponent().isKinematic = true;
}
}
You can absolutely do it, as described in the other answer, but it might not be what you are after.
If what you are trying to do is affect the collision response (depending on the tag of the collider), you can’t do that. By the time the collision happens, the response will be whatever it is, and you can’t change it.