I am unsure if I understand fully where your problem is.
Is the camera a child of a Kinetic/RigidBody ?
Then it will rotate with the movement of the body.
You could move the camera out of that body and adjust its position/angle separately.
Something like this (untested) inside the camera node:
extends Camera
var body
const CAMDIST = 20
func _ready():
body=get_node("../Body") #init with position of body (edit to adjust node name/path)
set_fixed_process(true)
func _fixed_process(delta):
var bt=body.get_transform()
var ct=get_transform()
var lookdir = bt.basis.z #get rotated z-vector of body
lookdir.y = 0 #don't look up/down
ct.origin=bt.origin #camera position = body position
ct = ct.looking_at(lookdir,Vector3(0,1,0))
set_transform(ct)