Results 1 to 2 of 2

Thread: Walkthru

  1. #1


    Hi all,
    I want to make a walkthru in a complex scene.
    My problem is, how can i find the z-coordinate for a given point (x,y) in the XY-Plane (e.g. for walking up stairs).


  2. #2
    Member Newbie
    Join Date
    Nov 2002

    Re: Walkthru

    You could use feedback mode (never used), read from the depth buffer (don't know how to) or remember where you've drawn which point. The first two possibilities won't give you the result expected. From the z-buffer (depth buffer) you'll get a value from 0 to 1. You must recalculate that value to a real z-value first (using the z-near and z-far parameters of glFrustum() or gluPerspective()).

    For what do you need the z coordinate for a given point? When posting a problem, you should explain it exactly for others to help you. Maybe there's a better solution for your problem.

    [This message has been edited by mm_freak (edited 11-05-2002).]
    Knowledge is Power

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Proudly hosted by Digital Ocean