Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Leo_Hsu on September 14, 2014, 04:22:02 AM

Title: unity 4.5 with ngui 3.7.1 using BoxCollider 2D
Post by: Leo_Hsu on September 14, 2014, 04:22:02 AM
Hello, I got some problem with this case by using BoxCollider2D.
When NGUI upgrade to version 3, the default scale of widget change to 1 and use the dimension to control the size . But if the widget size is less then 25*25 , the boxcollider2D was too smal to create a collision shape, I saw some one also got same problem on the forum .Does this issue fixed in the lates version of NGUI ? I tried to increase the scale of UIRoot Obj by disabling UIRoot script and size of Camera , it will make the collider2d got enough size to create collision.  But it seems not a good solution , Does NGUI provide any function to re-scale UIRoot and resize camera?

Thanks,
Leo.
Title: Re: unity 4.5 with ngui 3.7.1 using BoxCollider 2D
Post by: ArenMook on September 14, 2014, 04:39:25 AM
Simple solution -- don't use Box2D colliders. Use regular 3D ones, same as before. There is no reason to switch to 2D.
Title: Re: unity 4.5 with ngui 3.7.1 using BoxCollider 2D
Post by: Leo_Hsu on September 14, 2014, 09:36:03 AM
I need to use polygon collider2d for some specific case in my game play. thanks for the infomation. I will try something else to resolve this issue.
Title: Re: unity 4.5 with ngui 3.7.1 using BoxCollider 2D
Post by: SmartCarrion on July 04, 2015, 03:09:29 AM
Is this seriously the solution?  "Don't use Box Collider 2D" ?

why do you even support 2D at all then?  Also, why does NGUI have to scale the UI down to micro size?  this wouldn't be a problem if it wasn't 1000x smaller than the rest of the game world.

UI Camera does not allow mixing of events from 2D and 3D colliders, so i would have to redo everything into 3D colliders to fix this bug on my end?
Title: Re: unity 4.5 with ngui 3.7.1 using BoxCollider 2D
Post by: ArenMook on July 06, 2015, 08:02:04 PM
NGUI doesn't "have" to do anything. It's up to you to use UIRoot or not. You can remove it, or just change its manual height to 1.