- Joined
- Feb 20, 2007
- Messages
- 338
I have a follow camera which is set up to follow behind a unit at a distance, when the unit turns the camera turns with the unit facing the direction the unit faces.
Sadly every time the unit turns, the camera turns too - sad because the way units like to zig-zag through the map even across open country.
I had the camera set to rotate when the user uses the arrow button say if the player hits the left arrow to turn the unit left then the up arrow to move the unit forward the camera would lock on the direction the unit was facing when the left key was released (the direction the unit turned). The camera would remain in that general direction until the player either used the left or right arrow button (turning left of right) or the down arrow which turns the unit completely around to face the opposite direction and the camera turns as well.
I also tried using the esc button to turn the camera the current direction the unit is facing even while in motion.
However I like to use the mouse, clicking the ground, clicking on units attacking etc. is there a way to set the camera (and of course the unit) to rotate to face the spot where the ground/unit/whatever was clicked?
Sadly every time the unit turns, the camera turns too - sad because the way units like to zig-zag through the map even across open country.
I had the camera set to rotate when the user uses the arrow button say if the player hits the left arrow to turn the unit left then the up arrow to move the unit forward the camera would lock on the direction the unit was facing when the left key was released (the direction the unit turned). The camera would remain in that general direction until the player either used the left or right arrow button (turning left of right) or the down arrow which turns the unit completely around to face the opposite direction and the camera turns as well.
I also tried using the esc button to turn the camera the current direction the unit is facing even while in motion.
However I like to use the mouse, clicking the ground, clicking on units attacking etc. is there a way to set the camera (and of course the unit) to rotate to face the spot where the ground/unit/whatever was clicked?