BGE Animated rig freezes when rig goes off-screen... Can I make it not? I have an animated enemy chasing the player. On the enemy's rig, I save the animation's current frame to a property. I use this property to cue sounds.
It works fine when the player is looking at the enemy. However, when the player turn's their back and the enemy goes out of view, the animation freezes. I can tell that it has frozen because the property I am saving the current frame to stops incrementing. When the player looks back at the enemy, the animation starts from the beginning.
I'm assuming that this is something Blender does intentionally for performance reasons. Can I make it stop?
Any animation that is not seen by the active camera is culled, this is called frustum-culling. As for a solution for it, I am not 100% sure this is a solution, but you can disable frustum culling for a particular camera at run-time with the following code. KX_Camera.frustum_culling
Which is layman terms looks something like this.
import bge

def main(self):

  self.owner.scene.cameras[&quot;Camera_Name&quot;].frustum_culling = False

There is also another option called KX_Scene.activity_culling. Again, I am not sure exactly if this only applies to object logic, and not also object animation. The code for it can be found below.
import bge

def main(self):

  self.owner.scene.activity_culling = False