cloning/reusing mesh doing weird stuff?

Started by Disastorm, July 18, 2011, 06:11:01 AM

Previous topic - Next topic

Disastorm

Hello, I noticed cloning or reusing meshes seems to offset the center of the object or something like that sometimes.  Have you experienced this before?  Also should I call build() after cloning an object?  I've tried both ways, and both ways seem to have strange results.

*edit also noticed clearRotation() clears the scale of my model for some reason.

*edit ok i solved it, i was cloning a non-built object and then calling build after cloning, but i guess maybe thats not the proper thing to do? I added the build before the clone and now it works.  However, just wondering, the only build i need is before the clone or should i also call build after?

EgonOlsen

The actual order should be build()...clone. It doesn't make much sense to call build() after cloning but it doesn't really hurt either. It costs some performance though.