Originally Posted By: MrGuest
have a look at vec_lerp for its height and vec_dot for its angle

I have been reading both functions and am trying to come up with a clever way to implement it but I have to admit I have absolutely no idea what to do...

lets say this is a 16x16 square with these vectors:
D=(0,0,-1)
A=(0,15,6)
B=(15,0,7)
C=(15,15,0)

the coords are (x,y,height)
How would I calculate which triangle H1 or H2 are on?
How would I get the height of H1?
How would I get the height of H2?

H1 inside triangle ACD or BCD?
H2 inside triangle ACD or BCD?
H1=(3,11,?)
H2=(13,3,?)




"The more you know, the more you realize how little you know..."

I <3 HORUS
http://www.opserver.de/ubb7/ubbthreads.php?ubb=showflat&Number=401929&page=1