1
NGUI 3 Support / I'm losing pixel-perfect on mobile
« on: October 02, 2014, 06:10:51 PM »
Hey guys, I'm pretty sure I'm doing something wrong here. It doesn't look like I'm getting pixel perfect in ngui.
I'm making a pretty simple game. It's a top down runner type of game. The main element is 1 little sprite and a model that follows it around the screen. The model is the player. The idea is to move the player by dragging around the sprite. The game is played in portrait mode.
I have UIRoot set to flexible with min-height set to 400 and the max-height set to 1500.
Now the issue. I have the control sprite positioned at the start to 1/4 of the screen.height down. (Can't use an anchor because it needs to be dragged) The device has a screen size of 888 (accounting for the bar at the bottom). So it positions the sprite at -222. All is good, but for some reason that's outside of view.
Eventually I got it to show by placing it 1/6 of the way down instead. But when I drag it the sprite moves faster than my finger, like the ui isn't pixel perfect.
Now the weird part, it's working 100% perfect in the editor. Dragging is working good and resizing is positioning the sprite correctly. It's absolutely driving me mad. NGUI is acting like it's zoomed in or something...
Anybody come across this before?
[also] I've also tested it on a nexus tablet and the same thing is happening.
I'm making a pretty simple game. It's a top down runner type of game. The main element is 1 little sprite and a model that follows it around the screen. The model is the player. The idea is to move the player by dragging around the sprite. The game is played in portrait mode.
I have UIRoot set to flexible with min-height set to 400 and the max-height set to 1500.
Now the issue. I have the control sprite positioned at the start to 1/4 of the screen.height down. (Can't use an anchor because it needs to be dragged) The device has a screen size of 888 (accounting for the bar at the bottom). So it positions the sprite at -222. All is good, but for some reason that's outside of view.
Eventually I got it to show by placing it 1/6 of the way down instead. But when I drag it the sprite moves faster than my finger, like the ui isn't pixel perfect.
Now the weird part, it's working 100% perfect in the editor. Dragging is working good and resizing is positioning the sprite correctly. It's absolutely driving me mad. NGUI is acting like it's zoomed in or something...
Anybody come across this before?
[also] I've also tested it on a nexus tablet and the same thing is happening.
