i'm not sure I follow your description, But if you have an object in a container, if you access the mesh, you need to add the faces at space object coordinates they automatically get the offset of the parent coordinates.
now, another possible cause is the goemetry object. somehow, that thing sticks in ram. so before fill with new faces, just m.geometry = null, m.geometry=new Geometry(), then fill using addface. of course if previous geometry object olds faces, loop over the faces array and delete them or store them, if you want to reuse. but thats a shot in the dark to help you, as I'm not certain of the exact issue you're having. Fabrice On Jun 3, 2010, at 8:12 PM, Reinorvak wrote: > Greetings everyone, > > Alright here's the scoop this time. I've got my own custom BVH, > Bounding Volume Hierarchy, class set up to surround all the objects in > this game. This was set up before 3.5 came out and we don't have > enough time to switch over to the newest version so we're using 2.3. > > The big problem is, when I add a new mesh to a previously existing > object, the faces of the new mesh believe they are at the origin of > the object it was attached to. Visually, the items show up fine, but > this offset of having the item at 0,0,0 instead of its correct local > space position is ruining the BVH creation algorithm. > > So mostly what I'm asking for is this, is there anyway to update the > faces correctly to the new mesh position with distorting the model in > any way or form. I've tried a few things here and there, but nothing > solid has occurred out yet. > > Most appreciated, > Rein
