How to stabilize the first view(position/focus/ViewUp)

I used the Endoscopy module to create a first-view analog navigation,

and to demonstrate, I’m using a point as a guide,

when I move this point, the 3D view suddenly changes, especially when the position of the point moves to the left or right.

The following is part of the code, which mainly adds an observer to the selected point, then obtains the position of the point in real time, and takes the latest two positions as the camera position and focus position, and the viewUp position is fixed.

I mainly hope it can turn smoothly.

I know this is caused by a change in the vector direction of the camera position and focus, so I want to find a solution.

    def addPos(self,caller,event):
        transNode.GetNthControlPointPosition(0, position)
        if len(self.transList)>2:
            cameraPosition = self.transList[0]
            wasModified = self.cameraNode.StartModify()
            focalPointPosition = self.transList[1]

    def startNav(self):

        if navNode:

It looks like something else is also trying to set the view. Maybe if you can create a fully self-contained example script it would help.

Thank you, Mr Pieper, I solved the problem.

The problem is caused by the camera position being too close to the focus position.

I increased the distance between the camera and the focus, and it looked much more stable.

Although it’s still a little shaky.