diff --git a/src/sprites/rendered-target.js b/src/sprites/rendered-target.js index 1951700d3..bbf85231c 100644 --- a/src/sprites/rendered-target.js +++ b/src/sprites/rendered-target.js @@ -231,6 +231,9 @@ class RenderedTarget extends Target { if (this.isStage) { return; } + if (!isFinite(direction)) { + return; + } // Keep direction between -179 and +180. this.direction = MathUtil.wrapClamp(direction, -179, 180); if (this.renderer) {