Crosshair not centered

Report bugs of MFPS 2.0 here
Post Reply
User avatar
Leonid_RU
Contributor
Contributor
Posts: 50
Joined: Tue Sep 11, 2018 3:04 am

Mon Aug 24, 2020 1:59 pm

Hello!

In webgl, when changing the size of the window, crosshair does not adjust to the size of the window and remains in the same place as when the game was launched. That is, it is not located in the center of the screen, but shifted to the side. How can I fix this so that when changing the size of the game (including changing it to fullscreen), crosshair also adjusts to the size of the window and is centered?

I use mfps 1.75.
User avatar
Lovatto
Admin
Admin
Posts: 1541
Joined: Sun Dec 07, 2014 3:18 pm
Contact:

Tue Aug 25, 2020 6:40 am

Try removing all references of InitialPosition in bl_UCrosshair.cs,
remove or comment all these lines from the script:

Code: Select all

private Vector3 InitialPosition;
InitialPosition = RootContent.position;
RootContent.position = InitialPosition;
User avatar
Leonid_RU
Contributor
Contributor
Posts: 50
Joined: Tue Sep 11, 2018 3:04 am

Tue Aug 25, 2020 2:40 pm

Thanks, it works.
Post Reply