How can I make camera rotate in circle around a 3d object in javaFX? I know i can rotate it around itself using
camera.setRotate(angle);
but i want an object to be still and the camera to rotate and point to the same spot like the rotation axis is that object.
The general technique is defined the answers to: RotateTransition around a pivot? You define a rotate transform and then use a timeline (or animation timer) to animate the angle of the rotate transform as appropriate. If you want the object centered, then you can translate the camera to the origin of the object before rotating.
The sample here just demonstrates how to do this for a 3D app:
In the sample the camera is rotating around the cube, the center of which is at the scene co-ordinates 0,0,0. The animated rotation is around the y-axis. The sample images show snapshots at various degrees of rotation. You can click on an object in the scene to center the camera on the object and rotate around it.