☑ pc.GamePads() can not use when publich

Hi .

I found issue about pc.GamePads().
I can use gamepad on launch, however I can not use one on publish.
Project is here

My code “gamepad.js” :

var Gamepad = pc.createScript('gamepad');
var gamepads = new pc.GamePads();
// initialize code called once per entity
Gamepad.prototype.initialize = function() {
    
};

// update code called every frame
Gamepad.prototype.update = function(dt) {
    console.log(gamepads.isPressed(pc.PAD_1,pc.PAD_FACE_1));
    gamepads.update();
};

Can you please kindly help me?

Hello,

We are looking into this issue - it’s not yet clear why it’s happening but it’s not happening if you use the embed link (just add /e/ after https://playcanv.as .

We just deployed a fix for this. Please let us know if it’s working for you now.

2 Likes