Overhead Cam?

Anyone have an idea on how to lock a com.jme.input.ChaseCamera into an overhead view?  i want a came to follow a particular spatial but lock overhead.

You may want to take a look at ThirdPersonMouseLook for an example of this.  There are a bunch of properties you can set in there, but some you'd be interested in either using or mimicking (if you don't want to use ThirdPersonMouseLook) are:



PROP_MAXASCENT

PROP_MINASCENT

PROP_MAXROLLOUT

PROP_MINROLLOUT



Or, if you don't want them to be able to rotate the ascent of the camera at all:

PROP_LOCKASCENT



The code for each of those properties should be pretty straightforward, just check the variables that are set by them and how they're used.  If you don't use ThirdPersonMouseLook your best bet may be to override updateCameraPosition() in ChaseCamera.

Well, I can get it overhead to start, but once the player starts to move the cam automatically falls back. The ChaseCamera class contains a ThirdPersonMouseLook.  If I try to use ThirdPersonMouseLook then nothing happens at all for some reason.  I'll keep hacking away, thanks for the response.

Actually, I got it by disabling spring and then setting an ideal position and ideal sphere coords.  Now the problem is that the cam osculates back and forth very fast and just eats all the cpu doing that.  I actually need a slight angle on the overhead or else it does this.

Yeah, sorry about that…it's been a while since I've messed with jME and I was quickly skimming through the code…  Glad you got it all figured out  :slight_smile: