Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - kLy

Pages: [1]
1
NGUI 3 Support / TweenRotation not Lerping correctly
« on: July 02, 2014, 08:30:43 AM »
Seems like this behaviour is wrong. If you're going from 5˚ to 355˚ it should be a difference of 10˚, not 350˚ as it is now, causing the objects to swivel around frantically.

TweenRotation.cs should use LerpAngle instead of Lerp for lines 38-40

2
NGUI 3 Support / Camera depth and loading screen
« on: June 12, 2013, 09:18:39 AM »
Hey there

I have a loading screen in a separate scene that I bring in with LoadSceneAdditive in between level loading transitions.

Now the loading screen should cover all in-game elements for obvious reasons.

In that scene the GUI camera is set to a depth of 100. In the actual game the GUI camera is at depth 10.

However it seems like the GUI in the game is still being drawn on top of the splash screen even though Unity should be drawing the splash screen last according to the camera depth.

Is there something I'm missing here?

Thanks!

3
NGUI 3 Support / OnHover and child UI elements
« on: April 23, 2013, 05:22:02 AM »
I do a lot of tweening On Hover and I've repeatedly come across a problem:
If OnHover changes the UI in any way (eg. show a child button on the panel by moving or fading it in), there is no way to access the newly visible elements without moving hover focus off the parent button and thereby sending the parent the OnHover(false) event which would make the child buttons disappear again.

Now it seems like right now the only solution that stays within the bounds of how NGUI is meant to work is to create another larger collider *behind* the original and use that to do the "hiding" work instead of doing the hiding with the OnHover(false) event. The problems with this though:
1. I have a lot of these kinds of elements and this approach starts getting messy really quickly.
2. It is not foolproof. If the user manages to move the mouse very quickly, it is possible to pass over the larger "hide elements" collider altogether and the child elements then won't get hidden properly.

Ideally there should be an option somewhere to have the OnHover events ignore child objects that are in front of the main element. For example doing a collider.Raycast to do raycast checks instead of Physics.Raycast to see if the mouse is over the element, but at the same time ignore all other colliders that might be in the way.

What do you think?

Thanks :)

Pages: [1]