jPCT-AE - a 3d engine for Android > Support

Object3D with shared data

(1/1)

ramzes0071:
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?

EgonOlsen:
Do something like


--- Code: ---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();

--- End code ---

Navigation

[0] Message Index

Go to full version