Search code examples
javamodel3dlibgdxblender

LIBGDX: G3DJ Blender Model Says Its At 0, 0, 0 But Its Not


I have been reading Xoppa's Libgdx Tutorial on Loading models using Libgdx. Basically, I modeled a sphere in Blender and converted it to G3DJ to load on LibGDX. The camera looks at position 0,0,0 but the ball is off camera when it should be at 0,0,0, since I didn't set a position in the code. My code looks idential to the code in this link: https://xoppa.github.io/blog/loading-models-using-libgdx/ I don't even know what the problem is. I checked on Blender and the sphere isn't centered where all axes intersect either, does this affect the position of the exported model?


Solution

  • Try setting the centre of mass as the object's origin and then move it to 0, 0, 0. I'm not sure if the object's origin is important for you, but if not, then this should work.