Jump to content
Wiki

Automatically adjust view distance?

Recommended Posts

Hello,

 

is there a mod to automatically adjust the view distance and object distance, whether we're on foot or in a vehicle?

 

When playing KOTH, there is such an option, but didn't see it anywhere else.

 

Could be quite useful, does anybody know?

 

Thanks

 

Share this post


Link to post
Share on other sites

I know there's scripts that do it: CHVD by Champ-1

Share this post


Link to post
Share on other sites
5 minutes ago, Wiki said:

Thx but not exactly what I was looking for


Would something like this work?

while {alive player} do
{
	if ((vehicle player) isEqualTo player) then
	{
		setViewDistance 1000;
	}
	else
	{
		setViewDistance 2000;
	};
	uiSleep 10;
};

 

  • Like 2

Share this post


Link to post
Share on other sites
On 10/18/2019 at 4:06 AM, dave_beastttt said:


Would something like this work?


while {alive player} do
{
	if ((vehicle player) isEqualTo player) then
	{
		setViewDistance 1000;
	}
	else
	{
		setViewDistance 2000;
	};
	uiSleep 10;
};

 

 

Don't forget the respawn (so temp dead) case.

I' d rather write in initplayerLocal.sqf:

 

0 = [] spawn {
  setViewDistance 2000;
  while {true} do {
    waitUntil {uiSleep 3; isNull objectParent player};
    setViewDistance 1000;
    waitUntil {uiSleep 3; !isNull objectParent player};
    setViewDistance 2000;
  };
};

 

  • Like 1

Share this post


Link to post
Share on other sites

Wouldn't it be more practical and optimal to have the viewDistance scaled on the camera's altitude (we need to account for remote units too), with a cap on objectViewDistance?

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

×