[Solved] Fixed camera angle in isometric perspective

Announcements, support questions, and discussion for the Dialogue System.
Post Reply
OneManBandGames
Posts: 3
Joined: Mon Jun 27, 2016 11:15 am

[Solved] Fixed camera angle in isometric perspective

Post by OneManBandGames »

Hello everybody,

I've just started working with the dialogue system and I'm liking it a lot so far. However I have encountered one issue with camera angles which I was not able to resolve so far: My game uses an orthographic camera that follows the player at a certain angle and distance to maintain an isometric perspective (think of Diablo 1, for example). When I start a dialogue, I would like the camera to center on the person talking while maintaining the angle and distance to the actor to keep the exact same isometric perspective. Can I do this with the current camera angle system?

I tried to create a custom camera angle with the same distance and angle as for the player character, and it works in principle, but the problem is that the actor can be rotated on the Y axis when he/she/it is facing in a different direction. Then the custom angle is rotated with the actor as well, and the dialogue sequences take place from a different angle depending on who is talking and how he is rotated at the moment. This is very confusing since the player is used to see the game world from the default isometric perspective which then suddenly switches around according to who is talking.

Is there a possibility to keep the camera centered above the talking actor from a fixed distance / angle so the same perspective is maintained during the dialogue?
Last edited by OneManBandGames on Tue Jun 28, 2016 1:49 pm, edited 1 time in total.
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: Fixed camera angle in isometric perspective

Post by Tony Li »

Hi,

I'm traveling this week without access to Unity to be able to confirm this, but I believe you should be able to use the Zoom2D() sequencer command to zoom on the character properly in isometric mode.

If that doesn't work, and if you're comfortable with a bit of scripting, you could make your own sequencer command, similar to the Camera() command. If you want to do this, I suggest extracting a copy of the file Scripts/Core/Model-View-Controller/View/Sequencer/SequencerCommands/SequencerCommandCamera.cs from Scripts/SourceCode.unitypackage. Rename it and customize it to your liking.

If you get stuck, please post here. I'll do my best to help.
OneManBandGames
Posts: 3
Joined: Mon Jun 27, 2016 11:15 am

Re: Fixed camera angle in isometric perspective

Post by OneManBandGames »

Hi Tony,

thanks for the super fast reply! These two sound very promising, I will try using Zoom2D, if that does not work I am comfortable with scripting, and if the Camera command works as I imagine I should be able to customize it for my needs. Thanks again, I will post results once I've tried it out.
OneManBandGames
Posts: 3
Joined: Mon Jun 27, 2016 11:15 am

Re: Fixed camera angle in isometric perspective

Post by OneManBandGames »

I tried both methods: Zoom2D went in the right direction but always moved the camera to an offset of the talking actor so the screen was centered on some point right of the actor. I did not look into it much, but I can imagine that if the function was inteded for an orthographic 2D camera, then maybe this issue came from my tilted 3d perspective.

However I was able to achieve the desired result with my own sequencer command. I copied the Camera command as suggested and then applied my own camera position logic to focus on the speaker's position. Problem solved, thanks again for the tips & directions!
User avatar
Tony Li
Posts: 22107
Joined: Thu Jul 18, 2013 1:27 pm

Re: [Solved] Fixed camera angle in isometric perspective

Post by Tony Li »

Glad to help!
Post Reply