craftybox icon indicating copy to clipboard operation
craftybox copied to clipboard

Control which objects collide with which

Open sntran opened this issue 13 years ago • 2 comments
trafficstars

For example, some entity can go through wall, etc

sntran avatar Apr 20 '12 04:04 sntran

Crafty has the Gravity component with a .gravity(comp) to specify which component whose entity should stop the current entity from falling.

In Box2D, a static object will stop the entity. You can specify which object that the current object can bypass that collision. Quite a contrast.

sntran avatar Apr 20 '12 18:04 sntran

In Box2D, there is categoryBits and maskBits that would define it. Just need to figure out a good way to implement.

sntran avatar May 19 '12 21:05 sntran