So in my game, the armature for my character model is parented to a cube that controls the movement. To test teleporting I use the Y and U keys which teleport to different parts of my game. The movement cube moves via Location animations.
I’ve noticed that when teleporting, the armature will freeze on a frame (usually the idle stance) and it won’t be able to play any animations unless I restart the game. This also randomly occurs when teleporting anywhere else, but it doesn’t happen too often.
After going through the armature options, I can’t figure out why it keeps freezing.
strange, so armature parented to cube. the cube has the movement options?
then the question, modifiers, any in use? on the character mesh/obj? make sure armature modifier is on top of everything else.
but it can also be that using location keyframes for the cube messes with the location of armature, still it should not freeze.
def teleport(cont):
own = cont.owner
cube = own.scene.objects['cube']
# other_obj = own.scene.objects['other_obj']
cube.worldPosition = [0,0,5] # 5 units up at z axis
#---- or
#cube.worldPosition = other_obj.worldPosition
The armature modifier is the only modifier being used here. However I updated the character movement to use Servo Control instead of the simple motion and now I can’t seem to recreate the armature freeze issue. I’m sure I’ve accidentally fixed the issue.
I initially thought that the cube keyframes were interfering with the armature location, but that doesn’t seem to be the case.
After testing the game on a less powered PC, I’ve found that the issue occurs still and it happens almost every time I teleport to any location. The armature is still freezing a lot more when the game isn’t running as smooth.
Would this be the result of the location keyframes interfering with the armature?
As for the low powered PC I’ve used to test my game (the computers at my college class) everything works, nothing gets stuck besides the armature, it just doesn’t have the smooth 60fps I’d like to get.