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 - hesoul

Pages: [1]
1
NGUI 3 Support / Rotate UIWidget does not update display
« on: January 06, 2014, 04:17:28 AM »
I have a issue,when I rotate widget around the axis(1,1,0) or (-1,-1,0),the widget does not update display.
I found the function [UIWidget.UpdateTransform] only determine whether the bottom-left and upper-right corner to move,
so if you rotate widget around the axis which through those two points,will not update display.
how to fix it? determine three or four point?

2
NGUI 3 Support / Re: Raycast distance of UICamera
« on: January 03, 2014, 10:31:40 AM »
but 4 corners may not be hit,as shown in the figure,the red area can not be hit

3
NGUI 3 Support / Raycast distance of UICamera
« on: January 03, 2014, 07:38:28 AM »
The distance is calculated:
float dist = (cam.rangeDistance > 0f) ? cam.rangeDistance : currentCamera.farClipPlane - currentCamera.nearClipPlane;
when camera is OrthoGraphic there was no problem,but in 3D camare,whether this should be changed?
float dist = 0;
if (cam.rangeDistance > 0f) dist = cam.rangeDistance;
else
{
    dist = currentCamera.farClipPlane - currentCamera.nearClipPlane;
    if (!currentCamera.isOrthoGraphic)
        dist /= Mathf.Cos(Vector3.Angle(currentCamera.transform.forward, ray.direction) * 0.01745f);
}

Pages: [1]