animation.isTransitioning

Section: Animator State Machine

What it does

animation.isTransitioning answers whether Transitioning on an animation object. It takes entityId and layer. layer is optional.

Signature

animation.isTransitioning(entityId, layer?)

Arguments

  • entityId
  • layeroptional

Example · generated

function update(dt) {  animation.create('main', 'position', 30, 'float');  const isTransitioning = animation.isTransitioning('main');}

animation.create is there to give the call something to act on; animation.isTransitioning is the line that matters. The code sits in update(dt), which the engine calls every frame: dt is the time since the last one, in seconds.

22 members in animation