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.


Messages - sheavi

Pages: [1]
1
NGUI 3 Support / Re: Render UI by game camera
« on: July 08, 2014, 01:23:36 PM »
So, you're saying there is no problem using the second approach and having UI elements outside of the UI root that are rendered by the main camera?

As for the first approach, do you have an idea why the UIFollowTarget would have issues rendering perfectly when the game camera is moving?

Thank you very much!

2
NGUI 3 Support / Render UI by game camera
« on: July 08, 2014, 11:58:10 AM »
Hi,

I have a 2D game in which moving elements have UI elements following them. In general, this would not be a problem as it is easy to make UI elements follow a game object using the UIFollowTarget script. The problem is that you can zoom and pan the game camera (this is done by changing its orthographic size and its position). Using the UIFollowTarget script, I get very poor rendering : it seemed as if the UI elements have problems perfectly following the movements of the camera and this resulted in them flickering near the end of their movement.

To solve this problem, I tried having my moving UI elements rendered by my main camera. This way, I don't have to use UIFollowTarget anymore. My setup is this :
- My moving UIPanels are outside of my UIRoot, parented to the game objects they need to follow.
- These moving UI elements are all on the "UI" layer, which is set in the culling mask my main camera. My main camera also have a UICamera script with an event mask set to the "UI" layer.

Everything is working fine with the second approach expect one thing : the scale of my UI panel is completly broken (it is wayyy too small). Is there a way to fix either the first or the second approach? Or is there a better solution to achieve what I want?

Thank you in advance!




Pages: [1]