I like this camera system but it doesn’t seem to work if the logic from the cube is moved to an empty. Im trying to get it to work with this parent relationship.

Empty

||||||||||CamRot

|||||||||||||||||||||CamPitch

||||||||||||||||||||||||||||||||||||Camera

||||||||||Cube

Just a beginner with python but so far i changed,

pivot = o.children[0] to pivot = o.children[1] so it gets the right child.

pivot.worldOrientation is still spitting out strange values for the orientation matrix and i cant figure that one out, the result is the cube behaves uncontrollably. Is it possible to make it work this way?