question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Bodies can enter the seams of a concave polygon

See original GitHub issue

For a game, I’ve created a static donut-like boundary polygon through an inner & outer set of circular points with Matter.Bodies.fromVertices. I have some players inside it represented here as simple Matter.Bodies.circles. Random 360 degree movement is applied to them through what I think is a fairly weak Matter.Body.applyForce, and it all seems to interact correctly, but if the player applies force at the correct angle, it seems the body can enter seams of the donut and not be pushed out.

image

The random movement means I haven’t really tried to see how easily this can occur by a consistently applied force, but it seems to happen surprisingly often enough this way. Is this enough information?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
liabrucommented, Jan 31, 2021

Yeah that sounds like a good idea. I think in general it’s just very difficult to fully automate robust geometry generation for physics engines, it’s a complex problem in itself and can require manual work. There’s definitely room to improve this utility though.

Hopefully you can get it working from that so I’ll close this as it’s a known issue, feel free to report back here still if you find some success.

0reactions
MattTreichelYeahcommented, Jan 29, 2021

I’d have to figure something out to do that I think, but I could believe it works. I may just go ahead with using a second offset donut to cover the seams. Thanks.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Concave polygon - Wikipedia
A simple polygon that is not convex is called concave, non-convex or reentrant. A concave polygon will always have at least one reflex...
Read more >
Concave Polygon (Definition, Types, Properties and Formula)
A Concave polygon is a polygon that has at least one interior angle greater than 180 degrees. It must have at least four...
Read more >
26 Essential Blender Tips for UV Unwrapping Subdivision ...
Speed up your UV unwrapping workflow in Blender with these tips from CG Cookie's Pothead character creation course!You can watch the full ...
Read more >
concave polygon - Autodesk Maya Online Help
A polygon with notches or concave areas along its perimeter (as opposed to convex polygon). A five-pointed star is an example of a...
Read more >
PolyLoft geometry node - SideFX
Creates new polygons using existing points. This node generates meshes of triangles by connecting (i.e. lofting/stitching) the points of open or closed faces ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found