Page 1 of 1

Disable crooshair in UT4, how?

Posted: Thu Sep 21, 2017 3:48 pm
by Deathstorm
You might want to add to user.ini under [Engine.HUD]
[Engine.HUD]
CrosshairScale=0.0
CrosshairOpacity=0.0

There is no user.ini, there is a GameUserSettings.ini & a Scalability.ini... Scalability.ini sounds like the right file, is it???

Re: Disable crooshair in UT4, how?

Posted: Fri Sep 22, 2017 1:03 am
by evilgrins
Never having seen UT4, this is mostly guesswork.

It should be in the .ini file that also has your playername in it. Whichever .ini has your control setup and other such configured to your specific usage, should also have that bit on the crosshairs.

Simplest way to tell is to open each .ini and just do a search for crosshair.

Re: Disable crooshair in UT4, how?

Posted: Wed Sep 27, 2017 5:05 pm
by warhead
Hi, UT4 is in a pretty messy state right now, it's all pre-alpha and not even alpha, much less beta.
I am guessing you are not having much success altering the cross hair size, let alone turning them off.

The code can be hard to follow, but i did take a look at their current code and it appears that currently that part is broken.
They probably will fix in future.
If you are able to change the cross hair size, then just means i am not reading the code right. UT4 code base is huge so that would be no surprise.

but, here you have it. instead of reading any 'Cross Hair Scale' variable, the routine instead just returns 'Pickup scale', which isn't correct.
The below code is hard to read, but the end result of all the below is that it ends up always returning a "1", which tells the system to render the cross hair at normal size, and always the same size. The LastPickupTime block never gets entered so the "1" default gets used.

So current it doesn't look like it's reading any user setting for this.
Hopefully soon they will change to this read a value out of the user settings, as it does with other things such as the cross hair color.
See the GetCrosshairColor() function below to see how they probably should have coded GetCrosshairScale().

Bottom line is that currently it doesn't look like you can do what you want to do (yet).

float AUTHUD::GetCrosshairScale()
{
// Apply pickup scaling
float PickupScale = 1.f;
const float WorldTime = GetWorld()->GetTimeSeconds();
if (LastPickupTime > WorldTime - 0.3f)
{
if (LastPickupTime > WorldTime - 0.15f)
{
PickupScale = (1.f + 5.f * (WorldTime - LastPickupTime));
}
else
{
PickupScale = (1.f + 5.f * (LastPickupTime + 0.3f - WorldTime));
}
}

if (Canvas != NULL)
{
PickupScale = PickupScale * Canvas->ClipX / 1920.f;
}

return PickupScale;
}

FLinearColor AUTHUD::GetCrosshairColor(FLinearColor CrosshairColor) const
{
return CrosshairColor;
}

Re: Disable crooshair in UT4, how?

Posted: Thu Aug 09, 2018 3:26 pm
by Deathstorm
float AUTHUD::GetCrosshairScale()
{
// Apply pickup scaling

It should say Apply crosshair scalling right??? That seems like it should be right...

Re: Disable crooshair in UT4, how?

Posted: Wed Sep 19, 2018 1:35 am
by warhead
yup. that code seems pretty whacky right now. Someone cut n pasted wrong .... :D