How to raise a chaseCam?

I want the chaseCam to raise itself a bit higher above the ground. I really looked through the docs and couldn’t find how to do it. If there were a chaseCam.setlocation I could make I getlocation and add a vertical vector to it?



Please tell me how to do it or where I should look. I just want the camera from a bit higher perspective.



Thank you

The chase cam is attached to a spatial and will be located at that spatial’s location. Either you move that spatial’s origin higher or you attach a node to the spatial, offset that node to a proper height and attach your chase cam to that node instead.



That should technically work although I’ve never done this.

1 Like
@madjack said:
The chase cam is attached to a spatial and will be located at that spatial's location. Either you move that spatial's origin higher or you attach a node to the spatial, offset that node to a proper height and attach your chase cam to that node instead.

That should technically work although I've never done this.

Thanks. I will have to learn how to move a spatial's origin then (or attach an offset node). Since I'm a newbie these are many things at once for me.

I’m not sure if i understood your problem right, but if its that your camera is looking through the ground when its on the lowest position like this:



http://i.imgur.com/FxrIB.png



you can try this:



[java]chaseCam.setMinVerticalRotation(0.1f);[/java]



as long as you dont have any steep hills on your map it will work absolutely fine. If you have some your camera might be placed inside the hill and you will look through the hill (maybe you even want this to make sure you can always see your character, even when hes behind a hill or something like this)



hope i could help you



TaiTen

1 Like

Not sure I understand neither, but you can set an offset to the target the camera is aiming at.

chaseCam.setLookAtOffset(Vector3f offset);

so the cam will look at target’s world location plus that offset

1 Like

Thanks a lot, I will try all of your solutions. This should not be that difficult after all. I don’t have 3D hardware at my current device, but will try these solutions as soon as I have acceleration available.

@nehon said:
Not sure I understand neither, but you can set an offset to the target the camera is aiming at.
chaseCam.setLookAtOffset(Vector3f offset);
so the cam will look at target's world location plus that offset

Many thanks, this seems to solve it for me:
[java]chaseCam.setLookAtOffset(new Vector3f(0, 3, 0))[/java]