Game Development Community

When exiting Zoom the scene stays blurred

by Richard Marrevee · in Torque 3D Professional · 04/21/2010 (1:32 am) · 5 replies

I have a problem with the zoom command. When entering it works fine, but when ending the zoom all stays blurred except the middle of the screen, just as if it is still zoomed. I know there is a short thread about it with a fix, but I can't find it anymore.

Anybody knows the fix?

Thanks.

About the author

Started programming in 1984 on an Oric, when time progressed switched to MSX, Amiga and finally the Windows PC with T3D. Now developing an epic fantasy game: The Master's Eye. Creator of the DoorClass pack and VolumetricFog pack @ richardsgamestudio.com


#1
04/21/2010 (5:39 am)
In the file default.bind.cs, you must add DOFPostEffect.disable(); in the toggleZoom(%val) function.

function toggleZoom(%val)
{
   if (%val)
   {
      if (!$ZoomOn)
         commandToServer('getZoomReticle');
   }
   else
   {
      $ZoomOn = false;
      setFOV($Pref::Player::defaultFOV);
      reticle.setVisible(true);
      zoomReticle.setVisible(false);
      DOFPostEffect.disable();  // ADDED
   }
}
#2
04/21/2010 (5:42 am)
Thanks, this was the fix I was looking for.

[CLOSED]
#3
04/21/2010 (7:09 am)
This would make a good "drunk" or "disoriented" effect... lol!
#4
04/21/2010 (1:15 pm)
Thank you Richard, you just gave me a very interesting idea for an effect in my production.
#5
04/22/2010 (2:10 am)
@Richard (Ranft, replying to myself would be strange):

What is a good drunk effect without having a beer ;) On the other hand.....no headache.

@Lee:
No thanks, I have pressed the z-key by accident to get this effect. For me it was an unwanted effect, but when you think about it it can be useful.