Commit 9928e82c authored by Ken Martin's avatar Ken Martin
Browse files

minor fix

parent d7f5a38a
......@@ -101,7 +101,20 @@ void lookat(int fd, float vx,float vy,float vz,float px,float py,float pz,
mag = sqrt((pz-vz)*(pz-vz) + (px-vx)*(px-vx));
if (mag != 0)
{
rotate(fd, (vz-pz)/mag, (px-vx)/mag, 'y');
}
else
{
if (py < vy)
{
rotate(fd, 1, 0, 'y');
}
else
{
rotate(fd, -1, 0, 'y');
}
}
translate(fd,-vx,-vy,-vz);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment