Minor bug with Chase Camera


I intend to work this out on my own, but I wanted to let you know in case someone was already working on it, or in case you can tell me if I’m wrong. The bug is with ChaseCamera:

At minDistance the minVerticalRotation value no longer works. maxVerticalRotation is enforced no matter how zoomed in or out I am. minVerticalRotation works OK until I zoom all the way in. No matter what I set minDistance to, the behavior is the same.

I’m kind of overwhelmed with tasks right now, but I’ll dig into the ChaseCamera code myself and fix it within the next few weeks (and provide a patch), but again, I don’t want to duplicate effort, so I wanted to raise the issue here. Here’s a sample setup for ChaseCamera the exhibits the problem.

chaseCam = new ChaseCamera(cam, characterNode, inputManager);
chaseCam.setDefaultVerticalRotation(FastMath.PI / 4);
chaseCam.setMaxVerticalRotation(FastMath.PI / 4);
chaseCam.setMinVerticalRotation(FastMath.PI / 4);


P.S. I’m in love with JME3 - I can’t believe how much of the trivial work it does for me and how productive this makes me! Great job and thanks to all the devs!

1 Like

That’s intended as a feature actually, it was to make the cam acts like a first person camera when entirely zoomed in.


Really its expected that most games will need their own custom camera handling. The provided cameras are more for people to use as a starting point and for initial testing while they get used to things before they need to write their own either from scratch or based off one of the provided ones.


@nehon: I can see switching to first person perspective with free look. Makes sense. Logically speaking I still think it’d be nice to have the camera switch to 1st person if the minDistance was within some threshold (configurable, presumably) that put the camera physically in the characters space. In my use case, switching to 1st person when I’m still 25 from character is strange. But as noted…

@zarch: Yeah, and eventually I will. In my case ChaseCamera almost works exactly how I wanted it to. In fact, I may only override the zoomed in behavior when I do get around to implementing my own.

Also, I meant to say thanks for the info!