Flickering when moving camera

Hi,



I want the camera to follow the character on-screen, this is the code:

(it’s python, but should be understandable; self => this)

[java]

def simpleRender(self, rm):

self.cam.lookAt(self.player.physics_node.getLocalTranslation(),Vector3f.ZERO)

location = self.player.physics_node.getLocalTranslation()

self.cam.setLocation(Vector3f(

location.x + 30

, location.y + 60

, location.z + 30))

[/java]



This however makes the screen flicker enormously.

I could use a ChaseCamera (which works without flicker), but it felt overkill and I didn’t find a way to turn off the rotation when using the mouse.

I’d say you should setLocation first and then lookAt, no?