MaterialUI icon indicating copy to clipboard operation
MaterialUI copied to clipboard

Things don't work as expected when using 'Screen Space -Camera' render mode.

Open Benjiko99 opened this issue 9 years ago • 9 comments

Ripples don't render properly on some objects in the Game view (fine in Scene).

Gyazo

Gyazo Here the first element doesn't work, and others only work when clicked on certain spots (not clicking on the icon in the first ones and not clicking on the text in the later ones).

Benjiko99 avatar Apr 23 '15 19:04 Benjiko99

I'll take a look when I can :)

InvexGames avatar Apr 26 '15 05:04 InvexGames

I can't seem to reproduce this. Would you mind sending me a copy of your scene/project?

InvexGames avatar Apr 28 '15 18:04 InvexGames

Sure https://mega.co.nz/#!C0wEHT6Q!a55O_bp5IK9YJp54sGu8rcwitZSjjfRgq035qS7o65E sorry for late reply.

Benjiko99 avatar May 09 '15 09:05 Benjiko99

Firs of all thanks a lot InvexGames, your hard work really helped out our team of university students with not that much time to develop an app ;)

Benjiko99, to solve your problem, when setting render mode to 'Screen Space -Camera' , you can just adjust the canvas plane distance to 40, worked for us :D

Good Luck ;)

dmxride avatar May 12 '15 10:05 dmxride

@dmxride Changing the plane distance worked. The problem is that ripples are being created many units infront of where they should be, as seen here

Benjiko99 avatar May 12 '15 12:05 Benjiko99

Yeap, i also had to set the camera to ortographic so it would work on different resolutions and i had to change the on Drag method from the script NavDrawerConfig.cs to this, else it would kinda be messed up

public void OnDrag(PointerEventData data) { tempVector2 = new Vector2 (thisRectTransform.position.x, thisRectTransform.position.y); tempVector2.x += data.delta.x;

    //  thisRectTransform.position = tempVector2;

        backgroundCanvasGroup.alpha = 1 - (maxPosition - thisRectTransform.anchoredPosition.x) / (maxPosition - minPosition);
        shadowCanvasGroup.alpha = 1 - (maxPosition - thisRectTransform.anchoredPosition.x) / ((maxPosition - minPosition) * 2);
    }

dmxride avatar May 12 '15 12:05 dmxride

I have actually posted a fix for the nav drawer 19 days ago :) https://github.com/InvexGames/MaterialUI/pull/44/files

Benjiko99 avatar May 12 '15 12:05 Benjiko99

Yeap, awesome, better than my approach, thanks a lot @Benjiko99 ;)

dmxride avatar May 12 '15 12:05 dmxride

Hi! Thanks for bringing this issue to my attention :)

I'm now working on MaterialUI in a private repo, adding features and the likes for an official release on the Asset Store - this means that I won't be adding/fixing anything more in this repo (sorry). Feel free to fork this one if you'd like to tackle to issue yourself, and/or send me an email at [email protected] if you want me to let you know when it's available.

Cheers, Declan.

InvexGames avatar Jun 01 '15 17:06 InvexGames