Jump to content

Is off-center screen focus possible?

Recommended Posts

I have an idea for a mission that incorporates dialogue with NPCs and my question is:


Is it possible to draw the camera focus on an object/unit that is not in the center of the screen? ...meaning, I have a character on the left side of the screen, and that character is in focus while everything around and behind the character, and on the right side of the screen has a blur effect, so as to make the character "pop"?


I've created a camera and I have my positioning the way I want it, but the character is slightly out of focus and blurry while the very center of the screen is sharper. I'm just wondering if someone would know if it's possible before I sink any more time into this idea.

Share this post

Link to post
Share on other sites



I played around with camSetFocus before creating this topic but could not get it to set the camera focus the way I wanted, which is why I created this topic. But, I found that I was setting the cam focus too soon. So what I did was add a "waitUntil camCommitted" before I set the cam focus. I also realized that I needed to turn my "Depth of Field" setting up in the video settings menu so that I could actually see the difference. The spoiler is the snippet of code that worked for me.



_dialogueCamera = "camera" camCreate [position player select 0,position player select 1,2];

_dialogueCamera cameraEffect ["Internal", "BACK"];

_dialogueCamera camSetTarget (civ1 modelToWorld [-0.5,0,1]);

_dialogueCamera camSetRelPos [-2,-2.5,0];

_dialogueCamera camCommit 0.75;

waitUntil { camCommitted _dialogueCamera; };

_dialogueCamera camSetFocus[(_dialogueCamera distance civ1),1];


  • Like 1
  • Thanks 1

Share this post

Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now