LibGDX: Can individual objects from a scene be manipulated?

I’ve loaded a basic 3D scene(created in Blender) into LibGDX, that contains a few basic objects(a sphere, a cone, and a cube). Everything looks fine.

From here, is it possible to move the cube without moving the other objects?

I am very new to this, so it’s just a general question.

It depends on what you mean by move and whether they are in separate meshes. If you mean move th around in blender them yes, that is possible if they are all separate meshes. In code, yes, you should be able to move just the cube since they are all based off of a single origin, and not each other.

Yes, I meant all separate meshes.

Thank you for answering.

How would I move the cube? It’s named “Cube” within Blender(if it matters), and the model is called “myModel”, which has many methods, two of those methods are ‘meshes’ and ‘meshParts’.

My ModelInstance of the above model is called “modelInstance”.

Well I now know that using the transform method of the models instance will give me methods to rotate and move a model, but I still don’t know how I would move an object within that model.

Are there any good tutorials on 3D development using LibGDX? I’ve search and I’ve only found a few blogs that cover loading the model, but none that actually cover moving/rotating the object.

LibGdx is mainly a 2D library, tutorials are scarce.

Have you ever used cameras, I think that you are looking for a transformation-matrix :slight_smile:

The only camera usage experience I have is modeling in Blender, which I have just started.

Would Unity be a better option?


cubeModelInstance.transform.setToTranslation(x, y, z);

source: http://blog.xoppa.com/loading-models-using-libgdx/ (3 code blocks down)

That’s the blog that taught me how to load in the models.

The code works to mov the object around, and I can use other methods of translation to rotate a model, but I want a tutorial that’ll help me implement some of the modifications that I have added in Blender.