2D Smooth Collision, Prevent Player from Clipping Through Wall

I’m using the new 2D features found in Unity 4.3 and my character sprite is using a Polygon collider and Rigidbody2D and my wall is using a Box Collider.

When moving into a wall, the character ‘clips’ through slightly as if it is trying to force its way into the wall pushes it back so obviously this isn’t very smooth. Also, if enough force is applied from the character, it is possible to move the character sprite entirely through the wall itself.

I am not using any code to handle collisions, just the colliders and rigidbody.

Can anyone offer any insight as to how to make this look smoother? For example, stopping the player from moving any further if they are next to the wall?

Thanks

There are 2 properties of rigidbodies that you can change for smoother effect.

Rigidbody2D.collisionDetectionMode

and

Rigidbody2D.interpolation

See Documentation.

thanks spinner this smoothed my 2D collider collisions

rigidbody2D.collisionDetectionMode = CollisionDetectionMode2D.Continuous; rigidbody2D.interpolation = RigidbodyInterpolation2D.Extrapolate;