www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: Disastorm on July 18, 2011, 06:11:01 am

Title: cloning/reusing mesh doing weird stuff?
Post by: Disastorm 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?
Title: Re: cloning/reusing mesh doing weird stuff?
Post by: EgonOlsen 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.