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);
//this.app.fire("CheckPart");
};