Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: CO-ORD detection

  1. #1
    Junior Member Newbie
    Join Date
    Dec 2000
    Location
    Manchester,England
    Posts
    2

    CO-ORD detection

    how do i figure out the y value of a point under an object.
    lets say i have a box moving along some random terrain. when it encounters a hill i want its Y co-ord to be whatever the Y value of the terrain exactly under it is. Is there a way to do this?
    Cheers

  2. #2
    Guest

    Re: CO-ORD detection

    That depends entirely on how you store your
    terrain. If it's a height field, you can
    linearly interpolate between the four corner
    samples for the "quad" the vehicle is over.
    If you have a "driveable mesh" you have to
    find the triangle which contains the vehicle
    and calculate the Y of the vehicle's position
    from the three corners.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •