John Grden
unread,Feb 7, 2011, 2:28:50 PM2/7/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to unity3d-d...@googlegroups.com
Anyone any idea why my values are coming back in the thousands? I've confirmed that "pos's" values are correct in world space, none of the gameObjects are scaled (scale=1 on all), and yet for a resolution of 1024x768, I'm getting back values that are very high - see below:
private void SetDotScreenPosition(int currentDot, Vector3 pos, LineRenderer point)
{
pos = point.transform.TransformPoint(pos); // these values are verified as correct in world space
Vector3 screenPos = cam.WorldToScreenPoint(pos);
Debug.Log("SCREENPOS: " + screenPos.ToString() + ", POS: " + pos);
}
// output:
SCREENPOS: (2823.3, 540.1, 10.0), POS: (114.2, 3.7, 0.0)
any ideas on what i'm missing here?
Im running RC3 btw
Thanks all,
John
--
[ JPG ]