b2w_setBodyFilter function

  1. @Native<Void Function(Int64, Uint32, Uint32, Int32)>(ffi.Int64, ffi.Uint32, ffi.Uint32, ffi.Int32)>()
void b2w_setBodyFilter(
  1. int bodyHandle,
  2. int categoryBits,
  3. int maskBits,
  4. int groupIndex,
)

Set the collision filter of every shape on the body (chains included), with 32-bit category and mask bits. Two shapes collide when each one's mask has a bit of the other's category, unless they share a groupIndex: then a positive group always collides and a negative one never does. b2w_setBodyFilter64 takes all 64 bits.

Implementation

@ffi.Native<ffi.Void Function(ffi.Int64, ffi.Uint32, ffi.Uint32, ffi.Int32)>()
external void b2w_setBodyFilter(
  int bodyHandle,
  int categoryBits,
  int maskBits,
  int groupIndex,
);