I need to ActionManager.Parse an action with a OnKeyDownTrigger. I can serealize and parse an action if no parameter is provided with the trigger. e.g.
var action = new BABYLON.SetValueAction(
BABYLON.ActionManager.OnKeyDownTrigger,
scene,
'clearColor',
BABYLON.Color3.White()
)
if a parameter is provided:
var action = new BABYLON.SetValueAction(
{
trigger: BABYLON.ActionManager.OnKeyDownTrigger,
parameter: 'r'
},
scene,
'clearColor',
BABYLON.Color3.White()
)
the parsed action doesn’t work.
Is there an option to parse an action with paramter?