Because the movement of the camera means that the oppositive movement is added to any game objects in world coordinates, we must detail with its position update in the opposite order. To Transform . py make the following modifications:
def update_position(self, position: pygame.Vector3,
local=True) :
if local:
self.MVM = self.MVM @ np.matrix $\left(\left[\begin{array}{ll}1,0,0,0],\end{array}\right.\right.$
$[0,1,0,0]$,
$[0,0,1,0]$,
[position.x,
position.y,
position.z,
1] ])
else:
self.MVM $=$ np.matrix $\left(\left[\begin{array}{lll}1, & 0,0,0],\end{array}\right.\right.$
$[0,1,0,0]$,
$[0,0,1,0]$,
[position.x, position.y,
position.z, 1]])
(@) self.MVM