Why might an actor not pose?

I have an odd problem: I have one door–just one that I’ve found–that doesn’t properly reflect whether or not it’s open after reloading a save. I checked one other door, and that one seemed to reload as expected.

When reloaded, doors in my game “pose” their actors at the end of their relevant animations–that is, when loaded in the “open” state, they pose at the end of their “open” animation, and similarly when closed. Specifically, they pose at frame-number - 1. Like so:

self.actor.pose("open", self.actor.getNumFrames("open") - 1)

# Followed a little after by:
self.actor.update(force = True)

I’ve checked that the code in question is being reached, and it seems that it is.

Stranger still, the door’s collision-object–which is attached to an exposed joint–seems to be correctly placed! That is, when I load the problem-door in the “open” state, the door’s collider is in the “open” position! Indeed, if I change the frame-number in the call to “pose”, above, the collider’s position changes to reflect this change!

Hence it seems as though, somehow, the door’s mesh isn’t being updated along with its armature…

I do have animation-blending active–but I ran a quick test that should, I think, have bypassed that code, and it seemed to have no effect.

Any ideas…? :/

Maybe the door was just exported with an error that you didn’t notice.

The thing is, not only do the animations work when played normally (and I furthermore checked that the frame-count used for posing was correct)–but the model being used by the problem-door is the same as in the case of the door that loads correctly! o_0

Argh, I found it!

There was one line in the relevant level-script that was also posing the door, so that it didn’t appear locked! This was fine, as long as the door was closed… >_<

The fix was simple: just make that posing conditional, checking the door’s state first.