File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
packages/dev/core/src/Actions Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,12 @@ export interface IAction {
6565 * @see https://www.babylonjs-playground.com/#1T30HR#0
6666 */
6767 then ( action : IAction ) : IAction ;
68+
69+ /**
70+ * Internal only - Returns if the current condition allows to run the action
71+ * @internal
72+ */
73+ _evaluateConditionForCurrentFrame ( ) : boolean ;
6874}
6975
7076/**
Original file line number Diff line number Diff line change @@ -245,7 +245,9 @@ export class ActionManager extends AbstractActionManager {
245245 const action = this . actions [ index ] ;
246246
247247 if ( action . trigger >= ActionManager . OnPickTrigger && action . trigger <= ActionManager . OnPointerOutTrigger ) {
248- return true ;
248+ if ( action . _evaluateConditionForCurrentFrame ( ) ) {
249+ return true ;
250+ }
249251 }
250252 }
251253
@@ -260,7 +262,9 @@ export class ActionManager extends AbstractActionManager {
260262 const action = this . actions [ index ] ;
261263
262264 if ( action . trigger >= ActionManager . OnPickTrigger && action . trigger <= ActionManager . OnPickUpTrigger ) {
263- return true ;
265+ if ( action . _evaluateConditionForCurrentFrame ( ) ) {
266+ return true ;
267+ }
264268 }
265269 }
266270
You can’t perform that action at this time.
0 commit comments