2D Element collision

Hello, I want my 2D element to be colliding with other element. However it seems like they don’t collide with each other somehow… Would appreciate any help.

var BicyclePart = pc.createScript('bicyclePart');

// initialize code called once per entity
BicyclePart.prototype.initialize = function() {
    this.entity.collision.on('contact', this.onTriggerEnter, this);
    this.isGrab = false;

BicyclePart.prototype.onTriggerEnter = function(entity)
    console.log("Hit" + entity.name);


read that
i think u have to use their plugin to have 2d physics 3ds physics are different and i dont think work with 2d elements

1 Like

Hey koala, thanks for the reply. Someone suggested that I should use AABB detection for it and I did it.

Thanks for your suggestion. :slight_smile:

k glad it worked out :smile: