Original Post
Hi all,
I''m constructing a RPG in sort of a Tomb Raider type 3d engine. My question is if i have a square with 4 corners that differ in height and the X-Z coordinates (in a 0-1scale) where the player currently is the square. How do I in the fastest possible way calculate the Y coordinate based on where the player is in relation to the objects edges. EX:
y0 y1
______________
| |
| |
| |
| |
| x |
|______________|
y2 y3
x=playerpos
Regards Fredrik