Detect stuck dynamic body

General discussion about Box2D tutorials
Post Reply
Posts: 41
Joined: Thu May 29, 2014 5:01 am

Detect stuck dynamic body

Post by »

Hi all, Anyone know best way to detect when dynamic bodies are stuck inside/between static bodies?? Please see screenshot. Any hints greatly appreciated.

Untitled.png (20.03 KiB) Viewed 13270 times
Site Admin
Posts: 861
Joined: Sat Dec 22, 2012 7:20 pm

Re: Detect stuck dynamic body

Post by iforce2d »

This is very difficult, to the point where I probably would not bother. Better to spend your effort preventing this situation from occurring in the first place, for three reasons:
1. it's easier
2. it should improve player experience to not have things getting stuck to begin with
3. it avoids the question about where to move the stuck body once it is detected
Post Reply