kripken / ammo.js

Direct port of the Bullet physics engine to JavaScript using Emscripten

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Please add set_m_collisionFilterGroup() and set_m_collisionFilterMask() to ConcreteContactResultCallback

regnaio opened this issue · comments

In the file btCollisionWorld.h, ContactResultCallback has attributes m_collisionFilterGroup and m_collisionFilterMask. However, there is no way for us to set these values via ConcreteContactResultCallback, which is [JSImplementation="ContactResultCallback"] according to ammo.idl

We are able to set the group and mask values of ClosestRayResultCallback via set_m_collisionFilterGroup() and set_m_collisionFilterMask(). So, I'm unsure why we cannot do the same with ConcreteContactResultCallback.

Without this capability, we have little control over contactTest and when ConcreteContactResultCallback.addSingleResult is triggered.

Thank you for your time and help!

This can be resolved by adding

  attribute short m_collisionFilterGroup;
  attribute short m_collisionFilterMask;

under interface ContactResultCallback in ammo.idl

regnaio@d537f9b

For reference, a Dockerfile to easily build Ammo on any system is included: https://github.com/regnaio/ammo.js/blob/master/Dockerfile