Object needs to be in view or it disappears

I’ve been working on and off a FPS for the past months, and yesterday I finally bothered to make somes arms to hold the gun in first-person view (it was floating by itself before). So, I’ve made a left and right arm. The left arm is only needed in the reload action, in which it loads another magazine into the pistol.

Now my problem is that when I start the game, the armature, left arm and magazine need to all be in-frame when the game starts, or Blender seems to delete it, and the animation only has the right arm doing its movements, with no magazine leaving the gun, and no left arm to feed in another magazine. Is there a way of having them stay in the game, offscreen, without Blender making them vanish?
The only solution I have is to shorten the camera lens to show the arm there while I’m playing, but that creates its own problem as then there is a random arm floating there while you’re playing.

Thanks :smiley:

P.S. Before anyone asks, yes, I’ve searched for my problem. It’s hard to paraphrase this for a search, and so I only found brief mentions of the problem, but no fix.

“the armature, left arm and magazine need to all be in-frame when the game starts, or Blender seems to delete it” …???
This is quite weird??
Post a .blend, maybe?!

Not delete it, so much, it just doesn’t appear in the game when I start it. When I end the game it’s there, but unless it’s in view when I press ‘P’, it doesn’t seem to get included in the game. Same thing happens when I make a runtime.

EDIT: Okay I’m fairly sure the reason is because it’s an overlay scene, it’s in with the HUD, so unless the arm in the scene completely before starting it doesn’t get included in the overlay or something. Is there some way to tell Blender to include it anyway? Or some trick with Python?

If you’re deforming it with an armature, it may be because the model’s rest position is completely out of view. I had a similar problem in which a model being deformed by an armature would pop in and out of view depending on the location of the camera. To fix it, I added some new vertices to increase the size of the bounding box. If the bounding box is big enough to fit any deformation of the armature, the problem goes away.

Aaah thanks so much for that, works perfectly! I had resorted to having a bit of the hand poke into view.
Thanks again, that trick will come in handy.

No problem! It’s interesting that it’s the same issue. I came across it only yesterday.

I believe I know the root of this problem if any one cares.

The BGE has frustum culling. This means that all objects outside of the camera’s frustum are not drawn. So, only the objects you can see in the viewport are drawn. Also, meshes are not updated when they are deformed. This means that the BGE thinks that the arm is still out of the camera’s frustum and thus, is not drawn. By adding the few vertices to the mesh, you put it into the frustum.

Ah, thanks Moguri. It would be nice if there was an option to have the mesh recalculated. Then it would be support collisions, too.