jonascarpay / apecs

a fast, extensible, type driven Haskell ECS framework for games
392 stars 43 forks source link

Apecs-Physics collision handlers still nonfunctional #97

Open jtkelm2 opened 1 year ago

jtkelm2 commented 1 year ago

Issue #49 still reproduces for me. I haven't been able to get around the issue, but what I can say is that even though CollisionType appears to be properly exported as of today, CollisionGroup is not, and that appears implicated in the code.

dpwiz commented 1 year ago

I just tested this. The original code is missing a CollisionType component. A later post mentions that, but without code.

I've made a more verbose example out of it, with named values instead of blind ints: https://gist.github.com/dpwiz/34f195b0aa2191dd4c2f86ebea78814f

TLDR:

  1. you have to add CollisionType as a component to a shape (i.e. it would not be inferred from the masks)
  2. types are different from the groups (and not limited to a number of bits in the platform uint)
  3. something else what I've already forgot about :sweat_smile: