سؤال

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.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top