www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: ramzes0071 on November 07, 2013, 06:15:59 pm

Title: Object3D with shared data
Post by: ramzes0071 on November 07, 2013, 06:15:59 pm
Hi, I have one question. I need to create a lot of object3D(coins) each has different position and later translate each object separately. How should I do this?
Title: Re: Object3D with shared data
Post by: EgonOlsen on November 07, 2013, 08:49:40 pm
Do something like

Code: [Select]
Object3D copy=new Object3D(bluePrint, true);
obj.shareCompiledData(bluePrint);
obj.shareTextureData(bluePrint); // This may or may not apply in your case. In most cases, it's ok.
obj.compile();