Basically, I want to ask the camera this: How many meters would a cube at X distance from the camera have to move in order for its position's WorldToScreenPoint to change by one pixel
Is that possible?
Apr 27 '12 at 11:14 PM
Apr 27 '12 at 11:16 PM
Cast a ray from the next pixel onto a plane based on the cubes position. You can use the point it intersects with to calculate the distance between its current position and the raycasted position.
Apr 27 '12 at 11:43 PM
Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.
Once you sign in you will be able to subscribe for any updates here
Answers and Comments
The best place to ask and answer questions about development with Unity. Check out our FAQ for more information.
To help users post good questions and use the site effectively we have posted a tutorial video. Please check it out.
asked: Apr 27 '12 at 11:14 PM
Seen: 699 times
Last Updated: Apr 27 '12 at 11:43 PM
How to retain absolute gameobject size in pixels no matter the resolution?
How I get sizeof pixels of object
How to retrive camera pixel data?
Convert screenspace coordinates (top-left origin) to worldspace coordinates. Read before you react!
Modify Camera pixelWidth and pixelHeight
Calculate distance at which an object occupies 0 pixels, given bounding sphere?
Js to c# conversion
How do I make units pixels?
How can I know if a gameObject is 'seen' by a particular camera?