Locking vertical movement in ChaseCamera

Hi all

I'm porting Marble Fun to the current cvs version of jME, and am at the point of moving from my old third person camera system to the one now included in jME.

Here's my problem: I want to lock the vertical movement of the camera but can't see any appropriate method in CaseCamera.

Thanks for any help!

Try setLockAscent in ThirdPersonMouseLook  (or pass "true" to prop PROP_LOCKASCENT when creating your ChaseCamera.)

Well, I couldn't find a way to retrieve the ThirdPersonMouseLook, but passing a property worked just fine!

Code for anyone interested:

HashMap flags = new HashMap();
flags.put(ThirdPersonMouseLook.PROP_LOCKASCENT, "true");

chaser = new ChaseCamera(cam, player.getSpatial(), flags);
chaser.setTargetOffset(new Vector3f(0, 10, 0));


Glad you got it working…  for future reference you can call chaser.getMouseLook() to retrieve the ThirdPersonMouseLook.

Ah, must have been temporarily blind