Disable crooshair in UT4, how?

Feel free to chat about non-Chaos stuff in here.
Post Reply
Deathstorm
Posts: 227
Joined: Fri May 17, 2002 5:35 pm
Location: The death zone

Disable crooshair in UT4, how?

Post 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???
Image
evilgrins
Posts: 16
Joined: Fri Sep 01, 2017 4:09 am

Re: Disable crooshair in UT4, how?

Post 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.
warhead
Chaotic Dreams Team
Posts: 2046
Joined: Thu Oct 23, 2014 6:18 pm

Re: Disable crooshair in UT4, how?

Post 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;
}
https://twitter.com/warhead328
https://www.youtube.com/channel/UC0pIJx ... s-0ug_Etgg
Often thought to be intimidating, "warhead" is actually an inside joke poking fun at me, referring to the earlier days of my Unreal Redeemer fetish :D
Deathstorm
Posts: 227
Joined: Fri May 17, 2002 5:35 pm
Location: The death zone

Re: Disable crooshair in UT4, how?

Post by Deathstorm »

float AUTHUD::GetCrosshairScale()
{
// Apply pickup scaling

It should say Apply crosshair scalling right??? That seems like it should be right...
Image
warhead
Chaotic Dreams Team
Posts: 2046
Joined: Thu Oct 23, 2014 6:18 pm

Re: Disable crooshair in UT4, how?

Post by warhead »

yup. that code seems pretty whacky right now. Someone cut n pasted wrong .... :D
https://twitter.com/warhead328
https://www.youtube.com/channel/UC0pIJx ... s-0ug_Etgg
Often thought to be intimidating, "warhead" is actually an inside joke poking fun at me, referring to the earlier days of my Unreal Redeemer fetish :D
Post Reply