I did not set is Triggered on any of my two colliders, they both have rigid-bodies with Is-kinematic unchecked.
Now say I want to reset the other collider’s position that collides with my collider, is it possible?
I know it can be done, if one of colliders have isTriggered checked.
and using OnTriggerEnter()
function.
but that way one of my collider just passes through other colliders.
like this: https://media.giphy.com/media/OG38PwTPX23ZK/giphy.gif
I tried this code with above settings ,(i.e IsTriggered unchecked on both collider). but it does not work.
void OnCollisionEnter(Collision other)
{
if(other.gameObject.tag == this.gameObject.tag)
{
//reset this object position
}
}