Spine Game Objects and Containers will now add themselves to the Camera render list, fixing issues where input didn't work if depth was used or they were overlapped with another interactive Game Object.

This commit is contained in:
Richard Davey 2021-03-02 14:59:12 +00:00
parent 13fde9ce7a
commit 17ceb810e8
5 changed files with 10 additions and 0 deletions

View file

@ -27,6 +27,8 @@ var SpineContainerCanvasRenderer = function (renderer, container, camera, parent
return;
}
camera.addToRenderList(container);
var transformMatrix = container.localTransform;
if (parentMatrix)

View file

@ -36,6 +36,8 @@ var SpineContainerWebGLRenderer = function (renderer, container, camera, parentM
return;
}
camera.addToRenderList(container);
var transformMatrix = container.localTransform;
if (parentMatrix)

View file

@ -34,6 +34,8 @@ var SpineGameObjectCanvasRenderer = function (renderer, src, camera, parentMatri
var spriteMatrix = renderer._tempMatrix2;
var calcMatrix = renderer._tempMatrix3;
camera.addToRenderList(src);
spriteMatrix.applyITRS(src.x, src.y, src.rotation, Math.abs(src.scaleX), Math.abs(src.scaleY));
camMatrix.copyFrom(camera.matrix);

View file

@ -48,6 +48,8 @@ var SpineGameObjectWebGLDirect = function (renderer, src, camera, parentMatrix,
skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);
}
camera.addToRenderList(src);
var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;
var viewportHeight = renderer.height;

View file

@ -51,6 +51,8 @@ var SpineGameObjectWebGLRenderer = function (renderer, src, camera, parentMatrix
skeleton.color.a = Clamp(alpha * container.alpha, 0, 1);
}
camera.addToRenderList(src);
var calcMatrix = GetCalcMatrix(src, camera, parentMatrix).calc;
var viewportHeight = renderer.height;