ByteArena / box2d

Box2D.go - Go port of Box2D - a 2D Physics Engine for Games.
Other
295 stars 48 forks source link

Added the default Filter for MakeB2FixtureDef to fix the collision issue #30

Open E4 opened 4 years ago

E4 commented 4 years ago

Issue reported https://github.com/ByteArena/box2d/issues/28

The problem wasn't initially noticeable, but became apparent after commit a6df559053ea43d68d08d97682d86114bca6b7f0 for anything where collision Filter isn't explicitly set. The problem is that the function that makes the fixture doesn't assign a default collision filter which results in category/mask being set to 0, disabling collision. The Box2D documentation indicates the default should be 0x0001 and 0xFFFF respectively.

CLAassistant commented 4 years ago

CLA assistant check
All committers have signed the CLA.