I’m working on a tile-based strategy game, and my orthographic camera is at an angle to the field, which is flat against the y-axis.
I have two ways of moving my camera: - I can move it manually, in which case it moves along its local x and y axes. This works well because I can move it based on its current position and rotation. - I can focus on a unit. This is where I’m having issues.
When I select a unit, I’m going to move the camera to center on that unit. To do this, I’d like it to move so its centered on that unit without moving the camera on its local z-axis. (This is important to avoid clipping with the environment on large maps.) This way it will have the same behavior as when I move it manually.
I’ve included a screenshot of the editor view with the camera selected, as an example: https://i.imgur.com/Un8GZ5f.png
Does anyone have an ideas?
Thank you!