Author Topic: cloning/reusing mesh doing weird stuff?  (Read 845 times)

Offline Disastorm

  • long
  • ***
  • Posts: 161
    • View Profile
cloning/reusing mesh doing weird stuff?
« on: July 18, 2011, 06:11:01 am »
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?
« Last Edit: July 18, 2011, 09:19:32 am by Disastorm »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 11776
    • View Profile
    • http://www.jpct.net
Re: cloning/reusing mesh doing weird stuff?
« Reply #1 on: July 18, 2011, 04:19:35 pm »
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.