LibGDX - Camera movement - Camera looks 3d object?

Hi,

I’m now trying the Orbiting camera around a object.

I tried this code here:


float deltaY=1;
...
Vector3 vec = new Vector3( 2f, 3f, 0f);
camera.rotateAround(vec, Vector3.Z, deltaY);

The camera movement works, but it rotates about its own axis.

How can I now to add a distance between the object and camera and then rotate the camera around the 3D object.

I tried so many variations without success.

Thanks!

This was taken from blog.xoppa.com/basic-3d-using-libgdx-2/ I think it will help a lot for what your asking to do

Hi,

I know this example. It’s

gdx-tests/src/com/badlogic/gdx/tests/g3d/Basic3DTest.java

But I don’t know, how to use this code for my orbital movement?