ChaseCamera blinks!


Im using chasecamera to view my car, because all other possible ways are impossible.

Trust me, I'v been working hours after hours, days after days trying to get it to work

without no success!

So I am going to use Chasecamera!'

Problem is, that it "blinks" so that like every 1,3sec It renders a picture of the sky!

Plus, it follows to close and doesnt really turn when my car does :frowning:

Heres my code:

private void buildChaseCamera() {
        Vector3f targetOffset = new Vector3f();
        targetOffset.y = Car.getWorldTranslation().y * 1.5f;
        HashMap props = new HashMap();
        props.put(ThirdPersonMouseLook.PROP_MAXROLLOUT, "6");
        props.put(ThirdPersonMouseLook.PROP_MINROLLOUT, "3");
        props.put(ChaseCamera.PROP_TARGETOFFSET, targetOffset);
        props.put(ThirdPersonMouseLook.PROP_MAXASCENT, ""+45 * FastMath.DEG_TO_RAD);
        props.put(ChaseCamera.PROP_INITIALSPHERECOORDS, new Vector3f(5, 0, 30 * FastMath.DEG_TO_RAD));
        props.put(ChaseCamera.PROP_TARGETOFFSET, targetOffset);
        chaser = new ChaseCamera(cam, Car, props);

hard to say, maybe something else updates your camera.

You don't have another ChaseCamera, Third- or FirstPersonController in your game?

The ChaseCamera can be tricky to behave exactly like you want.

If possible i would try to use a custom chase camera.

You could start with a simple CameraNode (which is like a camera mounted on your car) and add slowly more functionality.

Something like that:

The camera stays in a certain Y and Z distance behind the object (in my case a spaceship) and rotates with a little delay (slerp()) with the ship.

Thanks alot  :smiley:

Im trying to use it…

Tho Im probebly doing it wrong…

In the init I do:

cc = new ChaseCam(Body3,30,10);
       camNode = cc.getCamNode();

and in update i do:


But still all I get is the usuall move around camera :(

What do I do wrong?

Im using SimplePhysicsGame, is that automaticly adding some sort of chasecam?

all simplegames use a firstpersoncontroller, which makes you able to move the camera areound with mouse and arrow keys