Author Topic: Shake the UI?  (Read 5358 times)

karsnen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
Shake the UI?
« on: July 04, 2013, 02:19:03 PM »
Hello,

I was just wondering whether it is possible to shake the UI. I tried to shake based on NGUI camera's position. But with no surprise it did not work.

My UI is a complete 2D UI. I just want to shake it on it's (x, y, z) axis.

Thank you

regards,
Karsnen.

Gregzo

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 64
    • View Profile
Re: Shake the UI?
« Reply #1 on: July 04, 2013, 02:30:23 PM »
Just shake your UI's parent object, it's not the most efficient but works.

If your parent obj has a UIAnchor, disable the UIAnchor component before shaking ( it locks the transform's position ).






karsnen

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 25
    • View Profile
Re: Shake the UI?
« Reply #2 on: July 04, 2013, 06:13:47 PM »
gergo =>

I am going to try it out. But while I am doing it - I just wanted to know what you meant by "not the most efficient method"?

Thank you.

Nicki

  • Global Moderator
  • Hero Member
  • *****
  • Thank You
  • -Given: 33
  • -Receive: 141
  • Posts: 1,768
    • View Profile
Re: Shake the UI?
« Reply #3 on: July 04, 2013, 07:16:50 PM »
If you move the root object, it should move everything without rebuilding the geometry. Be aware though, if you're using UIAnchors below, then they will make you have a bad time (they will move their respective elements back, which means you wont see a shake on them and all the geometry drawn by their panels wil be rebuilt which is costly.