Cannot read property '_getEffectiveTarget' of undefined in action.then

https://www.babylonjs-playground.com/#1T30HR#1

Trying to chain actions using .then(InterpolateValueAction) causes a “Cannot read property ‘_getEffectiveTarget’ of undefined” error.

Here is a working example https://www.babylonjs-playground.com/#1T30HR#4

Still looking into .then on actions but for now you can use it from the actionmanager.

The action needs to be registered before chaining

Thanks. I see the subtle difference.

I was doing:
registerAction(action1.then(action2));

You are doing:
registerAction(action1).then(action2);

So, it works, but in an unexpected way. I thought that the .then meant it was a sequence of actions. I expect the sphere to scale and then slowly scale back. In your example, it scales on a pick and scales back when you pick again.

What’s the proper way to create a sequence so that they happen in order on the first trigger?