I'm trying to use the ChaseCamera.setTarget(Spatial) method to switch between characters in my RTS game. When I click on a character, it does indeed change the target, but the camera is still rotating around my old target, for some reason.
What I mean by this is that if I use the ChaseCamera.getTarget() method, it will return the value that I am looking for (the last thing I had clicked on), but if I then zoom in or out or rotate, all of those functions act as if the camera is still following my original target.
I have attempted to set the camera's location to the location of the target I want, but I always end up selecting something else (I'm not sure how…)
Does anybody have advice on how to change the target that the ChaseCamera follows and have it update automatically?
Turned out to be a problem with my code-- I was mixing up local translations… my bad! This code works perfectly.