Lock ChaseCamera to Point Straight Down at Spatial

I am using a chasecamera to view my character (a marble type thing) and it’s working great, however: I need to lock the camera to point straight down at my ball because that’s the style of play in my game. I saw setMaximum/MinimumVerticalRotation() and thought I could use those however they aren’t really working out. This may or may not be the variables I am plugging in. Also, is there a way to adjust the direction the forces are applied to my ball depending on the horizontal rotation or position? Like if the top of the camera is pointing straight at the z axis W will push the ball down the z axis? Thanks for your guy’s help!
-cMp

TBH I wouldnt use chase camera.

Just write your own control/app state that constantly moves the camera to the correct position.

Set the max and min vertical rotation of the chase cam to the desired point.

EDIT: Missed that you tried this… what is the default distance set to? This will change how the camera works (i.e. first person if set to close)

@zarch said: TBH I wouldnt use chase camera.

Just write your own control/app state that constantly moves the camera to the correct position.

Thanks for the reply :). How do you suggest that I go about doing this?

@t0neg0d said: Set the max and min vertical rotation of the chase cam to the desired point.

EDIT: Missed that you tried this… what is the default distance set to? This will change how the camera works (i.e. first person if set to close)

I think I am going to do what zarch said :slight_smile:

@Slyth said: Thanks for the reply :). How do you suggest that I go about doing this?

It’s pretty straight forward… I’m feeling a little generous because my dinner isn’t ready yet: :slight_smile:
[java]
public class MyCameraState extends AbstractAppState {
private Camera cam;
private Node target;
private Vector3f delta = new Vector3f(0, 5, 0);

public MyCameraState(Node target) {
    this.target = target;
}

public void initialize( AppStateManager stateMgr, Application app ) {
    this.cam = app.getCamera();
}

public void update(float tpf) {
    cam.setLocation( target.getWorldTranslation().add( delta ) );
}

}
[/java]

…something like that.

Yep, that’s about what I was thinking. You might want to point the camera in the right direction as well in initialize.

Ah, yeah… in my haste I forgot that.

Something like:
cam.lookAtDirection( Vector3f.UNIT_Y.mult(-1), Vector3f.UNIT_Z );