Author Topic: Using Physics2D with FixedSize UI help  (Read 4770 times)

UncleAcid

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 51
    • View Profile
Using Physics2D with FixedSize UI help
« on: January 03, 2014, 04:10:54 PM »
Hi,

I am making a ball drop game and using NGUI for everything. I know NGUI is for UI not full games, but the game is simple enough (aside from the physics) that just using NGUI made sense (and I've used NGUI for full game sin the past and it's worked great).

Since the UIRoot is scaled to be very tiny (I assume this is the main issue) the ball (UISprite with a rigidbody) drops and bounces very quickly, changing friction and bounciness makes either little or huge difference, I cannot get it to move the way I need to. I've been trying everything for days now to get it to drop properly and I'm out of ideas. I need to get this working ASAP, and I don't know what to do anymore.

Anyone able to provide any help ?

Is there some combination of UIRoot and Camera settings that will provide better results ?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Using Physics2D with FixedSize UI help
« Reply #1 on: January 04, 2014, 08:53:30 AM »
You don't need UIRoot. You can safely remove it and set to scale to (1, 1, 1). You will also want to change the orthographic camera's size accordingly (360 for 720p for example). UIOrthoCamera script can also help here if you need pixel-perfect behaviour (which I'm guessing you don't).