Genbox / VelcroPhysics

High performance 2D collision detection system with realistic physics responses.
MIT License
672 stars 115 forks source link

Truly polygon Vertices #25

Closed yghtdnt closed 7 years ago

yghtdnt commented 7 years ago

I using a BodyFactory.CreatePolygon() and spawn polygons. But, some vertices are removed by GiftWrap.GetConvexHull(). So, now I add polygon... 2017_04_29 0_05_01 I want to change like this. 2017_04_29 0_04_39

Genbox commented 7 years ago

The engine does not support concave polygons. You could try to use chain shape instead for your terrain, or split your terrain into smaller rectangles that are convex.

If everything you create is predefined convex, you can turn off the Giftwrap convex hull by setting Settings.UseConvexHullPolygons = false

yghtdnt commented 7 years ago

I split vertices using point and nearby point. As a result, I solved this problem. thanks :)