Hello all,
I’m trying to implement an actionManager.registerAction
with .then()
and I’m unable to do so.
This example that works perfectly fine in the playground: Use Actions - Babylon.js Documentation (chain actions)
does not want to work when I implement it in my code (just changing what the then()
does):
this._my_geom.actionManager = new BABYLON.ActionManager(this._screen_frame.getScene);
this._my_geom.actionManager
.registerAction(
new BABYLON.InterpolateValueAction(
BABYLON.ActionManager.OnPickTrigger,
this._screen_frame._light,
'diffuse',
BABYLON.Color3.Black(),
1000
)
)
.then(
new BABYLON.InterpolateValueAction(
BABYLON.ActionManager.OnPickTrigger,
this._screen_frame._light,
'diffuse',
BABYLON.Color3.White(),
1000
)
);
I’m getting a warning in .then(
stating:
Do I have to specifically define the action with a different type to be able to make it work?
Thank you.
Additional information:
_my_geom type is BABYLON.Mesh