- Home /
OnCollisionEnter detects few contact points
Hi, I'm trying to implement a very simple mesh deformation algorithm based on my own..
My idea is to use the OnCollisionEnter method to detect the contact points and use the collision force to move the mesh vertices that are close to the contact points. The problem is that collision collect a very few contact points and for this reason the deformation looks weird.
In the image below you can see an example of a cube colliding with a plane, both the cube and the plane are parallel when they collide:
Red spheres are the contact points collected by the collision
Green lines are the force applied to contact points base on collision impulse
The yellow lines are the displacement applied to the mesh vertices based on proximity to the contact points
As you can see there are no contact points in the center of the cube, only a few points in the edges are detected. This cause a weird deformation.
Is this behavior normal? Is there a way to collect more contatc points?