Collision masks / Groups

Oops. My bad. I forgot to mention that the PlayCanvas rigidBody is a wrapper around the ammo.js’s btRigidBody and to get to it, you have to go this.entity.rigidBody.data which gives you access to ammo.js’s API (this allows you to make joints etc).

Again, my bad. I completely forgot about this when I did this before in a previous project (Miniclip).

I used a script to make it easier to configure the groups and masks which you can find here: PlayCanvas | HTML5 Game Engine

You can find the flags I used here: engine/src/framework/components/rigid-body/constants.js at main · playcanvas/engine · GitHub

1 Like