View Full Version : How to determine percentages of placement on screen?

05 May 2006, 03:11 PM
Okay, here's what I need to do:

Say I'm rendering Sphere01 through Camera01. I need to determine the x and y position of its pivot according to screen size on a scale from 0 to 1. So if Camera01 is set to render a 800x600 image and the pivot of Sphere01 in that image would be at pixel 200 in the x axis and 300 at the y axis, it would give me back: 0.25 and 0.5.

I think this is possible, but I have no clue on where to begin with this, so I call upon all you script gurus with a request to help me out. If you have any thoughts on how to approach this, please let me know.

05 May 2006, 07:04 PM
The answer is in the online reference, check out the topic "How To ... Develop a Vertex Renderer".


05 May 2006, 07:46 PM
Thanx, Martijn! I'm wrapping my head 'round this and'll give it a try...

Good luck with the workshops! That read as an informative course. Too bad I can't squeeze it in my schedule, having to work on my short for college and all....

CGTalk Moderation
05 May 2006, 07:46 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.