- Home /
OnCollisionStay contactPoint2D problem
I'm trying to figure out where my character is while he's colliding with an object by using the contactPoint but it seems like contactPoint is calculated only once
White ones are the collision points normals in character's onCollisionStay and red ones for the floor's onCollisionStay but even though i'm at a different location it only shows me the first collision point. How can i make it to be calculated again?
If i jump and fall in another side of the floor it's re-calculated, but it doesnt change if i move left-right.
I recently ran into this issue as well, It's quite a serious one too. It's essentially not possible to continuously detect contacts with 2D physics, from what I can tell :(
Answer by Acegikmo · May 13, 2014 at 07:47 PM
Here's a semi-workaround that worked in some cases for me:
void OnCollisionStay2D(Collision2D cols){
rigidbody2D.isKinematic = true;
rigidbody2D.isKinematic = false;
// Collision stay code here
}
But it's still a major issue in the 2D collision system