www.jpct.net

jPCT-AE - a 3d engine for Android => Support => Topic started by: hedgehog on August 30, 2012, 02:57:37 pm

Title: z-difference in objects from Blender
Post by: hedgehog on August 30, 2012, 02:57:37 pm
In Blender I have created a landscape plane and a flat water-level plane, and intersected them so water shows in the low areas. I have then exported as OBJ format, then serialized them for use in my Android app, but when the app loads, the water plane is too low and has to be translated about 35 units in the z direction to get the same look as my Blender scene.

Do you perhaps know why this is happening?
Title: Re: z-difference in objects from Blender
Post by: EgonOlsen on August 30, 2012, 08:24:39 pm
If you apply a rotation after loading, it might have to do with the rotation pivot. If you rotate, are you doing this before or after calling build()?
Title: Re: z-difference in objects from Blender
Post by: hedgehog on August 31, 2012, 02:53:38 pm
Well I am not doing any rotation before serializing. There is rotation done when the serialized objects are loaded into the Android app.
Title: Re: z-difference in objects from Blender
Post by: EgonOlsen on August 31, 2012, 08:35:53 pm
That's might be the reason because jPCT calculates the rotation pivor based on the object's geometry. Either try to do the rotation before building and serializing the mesh on the desktop or set the rotation pivot of one object to the other one after loading it and see if that helps.