box2d PolygonShape inside PolygonShape
-
28-10-2019 - |
题
I created full screen "borders" which contains boxes (boxes should move inside this borderBox). Boxes are dynamic and borderBox is a static body. BorderBox is PolygonShape and boxes are PolygonShape too.
But when I "put" by boxes inside borderBox its automatically move out of the borderBox.
What should I do? Can I use PolygonShape to create such borders or I should just draw lines instead of that?
解决方案
b2PolygonShape and b2CircleShape are not hollow. So you can put nothing inside these shapes. What you want to use for screen bounds is b2EdgeShape.
不隶属于 StackOverflow