victorfisac / Physac

2D physics header-only library for videogames developed in C using raylib library.

Home Page:http://www.victorfisac.com/physac

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Position correction doesn't work as expected in Circle vs Polygon collision

victorfisac opened this issue · comments

Polygons and circles doesn't overlap between bodies of the same type. But as you can see in the attached screenshot, some circles overlaps with the rectangle (which is a polygon too) and doesn't correct its position during steps...

I think there is some bug in manifold penetration calculation, or maybe some condition which returns the function and doesn't let the program execute position correction instructions.

Review functions: SolveCircleToPolygon(), SolvePolygonToCircle(), CorrectPhysicsPolsitions()

physics_demo_bias

Fixed in commit: 8937b34