i was looking also for a third person camera ( arcRotCam ) attached to a physic mesh and found this topic.
Instead that the mesh moves the cam, i wanted to inherit the movement from the mesh to the cam.
End result should be a vr camera which is attached to an object/mesh (car) that is moving. The cam should rotate with the mesh in curves and also allow to look around.
What I came up with and it worked:
scene.activeCamera.target.x = parseFloat(targetMesh.position.x);
scene.activeCamera.target.z = parseFloat(targetMesh.position.z);
eulers = this.targetMesh.rotationQuaternion.toEulerAngles();
scene.activeCamera.alpha = -parseFloat(eulers.y);
The problem now is that i constantly block/override the alpha/rotation of the camera so the users input e.g. on leftMouse down/or later on deviceoriantation has no effect anymore on rotating the camera on the y Axis/alpha. Does someone have an idea how to also add the users input values to that.
Thanks a lot