v3.2.1: fixed camera follow working on enemies out of FOV

This commit is contained in:
Evan Debenham
2025-08-13 14:33:28 -04:00
parent b8ea04a327
commit a0af4894a6

View File

@@ -177,7 +177,7 @@ public class Camera extends Gizmo {
float deadX = 0;
float deadY = 0;
if (followTarget != null){
if (followTarget != null && followTarget.visible){
//manually assign here to avoid an allocation from sprite.center()
panTarget.x = followTarget.x + followTarget.width()/2;
panTarget.y = followTarget.y + followTarget.height()/2;