While using the custom property, “main” on the scene object to make the BGE yield control to python, it seems that bge.constraints.getCharacter() returns None. However, said function works properly while under normal BGE operation and returns the bge.types.KX_CharacterWrapper for the object as expected.
Does anyone have any insight as to why this happens and possibly how I might compensate for it or work around it?
Update:
I was able to determine that several of the functions that rely on “PHY_GetActiveEnvironment()” seem to cause blenderplayer to crash/segfault when BGE yields control to python. According to the source, the only time the python binding, “bge.constraints.getCharacter()” method returns None is when “PHY_GetActiveEnvironment()” returns something that evaluates to false.
Perhaps this is worthy of a bug report? I don’t know if I need to invoke some hidden python method, whether it is a bug, or the developer(s) simply haven’t finished implementing this particular feature.