Welcome,
Guest
. Please
login
or
register
.
October 03, 2024, 06:49:56 AM
Home
Help
Search
Login
Register
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Jitter Bug Blues
« previous
next »
Print
Pages: [
1
]
Author
Topic: Jitter Bug Blues (Read 1731 times)
wallabie
Full Member
Thank You
-Given: 0
-Receive: 0
Posts: 200
Jitter Bug Blues
«
on:
March 10, 2014, 11:06:30 PM »
Here's my first attempt at creating a resizable thumb control. I added a thumbLeft and thumbRt as children of the main thumb. Then I added a DragResize to both of the children. When dragging the thumbRt constantly does a Jitter Bug dance. I tried changing various combinations of pivots but still the same jittering. The thumbLeft stays perfect.
Video:
https://dl.dropboxusercontent.com/u/48378123/JitterBugBlues.mp4
Another question: Is it possible to change the pivot at run time, for example, if the user clicks on thumbLeft or thumbRt, I would like to change the pivot of the parent's Thumb.
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Jitter Bug Blues
«
Reply #1 on:
March 11, 2014, 06:17:31 PM »
I don't know what you have them anchored to, but the jitter is likely caused by floating point rounding resulting from having a centered pivot and dimensions that are not dividable by two.
Yes you can change the pivot at run time. UIWidget.pivot.
Logged
wallabie
Full Member
Thank You
-Given: 0
-Receive: 0
Posts: 200
Re: Jitter Bug Blues
«
Reply #2 on:
March 12, 2014, 12:26:37 AM »
The 2 extra left and right thumb sprites are simply children of the Thumb sprite.
As you can see, the left Thumb works, but the right one doesn't. Should I use some sort of anchor?
Logged
ArenMook
Administrator
Hero Member
Thank You
-Given: 337
-Receive: 1171
Posts: 22,128
Toronto, Canada
Re: Jitter Bug Blues
«
Reply #3 on:
March 12, 2014, 09:49:58 PM »
If they are children, and they are not anchored, then they will always move with the parent and have no reason to jitter. Can you post a pic of inspector with the offending sprite selected (one that jitters)?
Logged
Print
Pages: [
1
]
« previous
next »
Tasharen Entertainment Forum
»
Support
»
NGUI 3 Support
»
Jitter Bug Blues