WorldToScreenPoint - extreme values

Skip to first unread message

John Grden

Feb 7, 2011, 2:28:50 PM2/7/11
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,


[  JPG  ]

Elliott Mitchell

Feb 7, 2011, 3:31:59 PM2/7/11
I don't know,  maybe either contents of the gameObjects are scaled or there could be transform data on a parent group or something?  


You received this message because you are subscribed to the Google
Groups "Unity3D Developers" group.
To post to this group, send email to
To unsubscribe from this group, send email to
For more options, visit this group at

Reply all
Reply to author
0 new messages