I’m using Away3D 4, and having an issue with a mesh disappearing from the screen once the center of the mesh is off-screen. I’m using a FirstPersonController like the one set up in the advanced terrain example.
Here’s the behavior I’m observing:
- I have several static meshes imported from .obj files, and one animated character imported from an .md5mesh, with an .md5anim animation applied.
- The obj meshes are not being culled before going off the edge of the screen
- The animated .md5mesh disappears when the center of the mesh leaves the screen.
Any ideas?
Update: I’ve noticed that this behavior only happens when the animation is playing. If I just place the md5 model in the scene without playing the animation, the model does not disappear before leaving the edge of the screen.
Update2: I’ve set showBounds for the mesh to true. Before the animation starts playing, the bounds look correct. As soon as the animation starts, the bounds move up about half the height of the model. So, the mesh is being culled once these incorrect bounds are off the screen. I’ve tried various things with the mesh and skeleton before exporting from Blender, like making sure the mesh and skeleton had origins in the same location in case it was some kind of parenting offset issue, or at the origin, then re-parenting the mesh to the skeleton, none of this has made a difference. I’ve made a new simple two-bone skeleton, same problem.
Update 3 (resolved): I’ve gotten it to work by making sure that the origin of the skeleton is at the origin of the root bone, and that this is also at the 3d origin in blender before exporting. I tried simply applying the location to the armature so that the skeleton origin was at the 3d origin, but that didn’t do it. The only way I’ve gotten this to work is by making sure that:
1. The origin of the skeleton is at the root bone.
AND
2. This origin is at (0,0,0) in Blender.
btw, I’m using the md5 exporter available here: http://www.katsbits.com/tools/ with Blender 2.59.