Hi everyone!
For example I have an action when ‘E’ button is pressed:
scene.actionManager = new BABYLON.ActionManager(scene);
scene.actionManager.registerAction(new BABYLON.ExecuteCodeAction({ trigger: BABYLON.ActionManager.OnKeyDownTrigger, parameter: 69 },
function () {
//do something.
})
);
For example user has changed his controls settings, and now it’s ‘F’ button (keyCode 70).
Can we update a key in the existing ExecuteCodeAction, without unregistering this one and registering the new one (with a new key)?
Direct approach like this doesn’t work:
scene.actionManager.actions[0].triggerOptions.parameter = 70;