The case of the flickering scabbard

I’ve encountered another odd animation problem. This may well be something on my end (it seems likely, in fact), but I’m really not sure of where the problem lies.

The model used for the protagonist during my game’s combat mechanic includes a scabbard for her sword. For some reason, this has taken to flickering in and out of existence. As far as I see, no other part of the model is affected.

The scabbard is controlled by a “loose” bone–that is, one that has an offset from its parent bone.

I somewhat suspect that offset of causing the trouble–except that the character’s hair also uses “loose” bones such as this. On the other hand, some vertices of said hair also take influence from a “non-loose” bone.

The scabbard was modelled as a separate piece, but joining its mesh to that of the main character before exporting doesn’t seem to have helped.

There should be attached an animated gif, showing the bug in action, and a screenshot of Blender, showing the portion of the armature that includes the scabbard, the bone for which should be highlighted.

Any ideas? :confused:

The bug itself:

The armature:

Okay, I think that I’ve found the problem: the scabbard is being culled on-and-off, presumably as the character and camera move relative to each other.

Calling “Actor.fixBounds()” seems to solve the problem, but with one issue: according to the documentation, it won’t work unless a few frames have already been rendered. Simply having it be called on every update seems to work, but is there some way of telling when the Actor is “ready” for “fixBounds” to be called, so that I can perhaps call it just once?

[edit] I tried giving the Actor an “OmniBoundingVolume”, but oddly, that doesn’t seem to help. o_0