Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raycast coordinates are incorrect #52

Closed
CHFreezer opened this issue May 6, 2019 · 5 comments
Closed

Raycast coordinates are incorrect #52

CHFreezer opened this issue May 6, 2019 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@CHFreezer
Copy link

Masked button can't be clicked.

  • Unity: 2019.1.1f1
  • SoftMaskForUGUI: v0.8.0

I tried to modify

int y = (int)((softMaskBuffer.height - 1) * Mathf.Clamp01(sp.y / Screen.height));

to:
int y = (int)((softMaskBuffer.height - 1) * (1 - Mathf.Clamp01(sp.y / Screen.height)));
after it worked for me.
But I want to know why, thanks!

@mob-sakai mob-sakai self-assigned this May 7, 2019
@mob-sakai
Copy link
Owner

Hi @CHFreezer
Thank you for reporting!

  • Can you submit a reproducible project for this issue?
  • Please tell me your environment
    • Platforms: e.g. Editor [Windows/Mac], Standalone [Windows/Mac], iOS, Android, etc...
    • Devices:
    • GPU and Graphic API:

@mob-sakai
Copy link
Owner

I think UNITY_UV_STARTS_AT_TOP is related.

@mob-sakai mob-sakai added the bug Something isn't working label May 7, 2019
@vekstr
Copy link

vekstr commented Aug 2, 2019

@CHFreezer 's fix also worked for me

@Matata-lol
Copy link

I think UNITY_UV_STARTS_AT_TOP is related.

Yes, it is. OpenGL works fine, but DX11 has this problem.

D33pTh0ught added a commit to D33pTh0ught/SoftMaskForUGUI that referenced this issue Nov 15, 2019
…axis beeing inverted on some graphics apis
D33pTh0ught added a commit to D33pTh0ught/SoftMaskForUGUI that referenced this issue Nov 15, 2019
…axis beeing inverted on some graphics apis
@mob-sakai
Copy link
Owner

I am sorry for not fixing this problem for a long time.
I will fix it with SystemInfo.graphicsUVStartsAtTop API.

https://docs.unity3d.com/2017.4/Documentation/ScriptReference/SystemInfo-graphicsUVStartsAtTop.html

mob-sakai pushed a commit that referenced this issue Jan 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants